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.
E-Ink Screen + Raspi on an easel | Dashboard View |
---|---|
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
Built Distribution
File details
Details for the file portrayt-1.0.0.tar.gz
.
File metadata
- Download URL: portrayt-1.0.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.4 Linux/5.15.0-57-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a42780115c3f809648b7709dc81c2362c732b068a48673564e8cad998f026a0 |
|
MD5 | d739f8c4e9d84b97794385df9ad47346 |
|
BLAKE2b-256 | 7af166a7663f4a15737c95634cf08086f945accef68b4746b70695417d27a257 |
File details
Details for the file portrayt-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: portrayt-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.4 Linux/5.15.0-57-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89f9a71f28427a72360111590ca2271876819b925c73e962178c5e7bd45ca881 |
|
MD5 | 5c5e5e2188cc1c3169fe1adb26dc8d0b |
|
BLAKE2b-256 | 3fc16dcd7338d39d832944746e860bbbbad4f72e7c506245e9a9cbe12dc5ddac |