Skip to main content

This project combines e-paper, raspberry pi's, and StableDiffusion to make a picture frame that portrays anything you ask of it.

Project description

portrayt

This project combines e-paper, raspberry pi's, and StableDiffusion to make a picture frame that portrays anything you ask of it.


PyPI version Test Status Lint Status codecov Code style: black Imports: isort


E-Ink Screen + Raspi on an easel Dashboard View
portrayt-easel.jpg screenshot.png

Development

Installing python dependencies

poetry install

Running Tests

pytest .

Formatting Code

bash .github/format.sh

Linting

bash .github/check_lint.sh

Running the Program

Install docker

curl -sSL https://get.docker.com | sh
sudo groupadd docker
sudo usermod -aG docker $USER

Create a .env file in your current directory and fill in the API key:

REPLICATE_API_TOKEN=<your token here>
RENDERER=inky

Build and run the image

docker compose up --build -d

When using a Raspberry pi, make sure to enable the spi interface by going to raspi-config, interface options, and selecting enable.

Running on desktop

For local development, OpenCV is used to render images to a window. The .env file needs to be updated to allow opencv to be installed (and used for rendering).

In the .env file, fill out the following:

REPLICATE_API_TOKEN=<your token here>
RENDERER=opencv
POETRY_EXTRAS=--extras opencv

Then, in terminal give docker access to the X window manager:

xhost +

Then build and run using the above commands.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

portrayt-1.0.0.tar.gz (13.1 kB view hashes)

Uploaded Source

Built Distribution

portrayt-1.0.0-py3-none-any.whl (16.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page