Skip to main content

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.

Release files for portrayt 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for portrayt 1.0.0
File Size Uploaded
portrayt-1.0.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for portrayt 1.0.0
File Interpreter ABI Platform
portrayt-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.5 kB

Release files / portrayt-1.0.0.tar.gz

Download URL portrayt-1.0.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8a42780115c3f809648b7709dc81c2362c732b068a48673564e8cad998f026a0
BLAKE2b-256 checksum
How to use checksums
7af166a7663f4a15737c95634cf08086f945accef68b4746b70695417d27a257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.4 Linux/5.15.0-57-generic

Release files / portrayt-1.0.0-py3-none-any.whl

Download URL portrayt-1.0.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89f9a71f28427a72360111590ca2271876819b925c73e962178c5e7bd45ca881
BLAKE2b-256 checksum
How to use checksums
3fc16dcd7338d39d832944746e860bbbbad4f72e7c506245e9a9cbe12dc5ddac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.4 Linux/5.15.0-57-generic

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page