Generate ICRL thought-of-the-day images using LiteLLM, PIL, and Typer.
Project description
ICRL Generator
This project generates polished “thought of the day” images for the International Consciousness Research Laboratories (ICRL).
It uses LiteLLM to:
- Turn a text thought into an image prompt
- Generate an AI image
- Add fully-wrapped, centered text to the top-right of the final image
The script is exposed as a command-line tool using Typer.
Features
- Generate text-to-image prompts using LiteLLM (
completion) - Produce images using LiteLLM (
image_generation) - Automatically wrap overlay text with pixel-accurate measurement
- Save:
- the final processed image
- the raw generated image (optional)
- the generated image prompt (optional)
- Easy CLI interface
Installation
git clone https://github.com/HonakerM/icrl-generator.git
cd icrl-generator
pip install .
Usage
CLI
After installation, you can run the following command to generate an image.
Linux:
export OPENAI_API_KEY = "<openai-api-key>"
icrl-gen \
--image-prompt-output image-prompt.txt \
--raw-image-output raw_image.png \
--log-level DEBUG \
"Never assume that what you see on a person’s face is what lies in their heart. A frown is not always intended for you, a smile is not always indicative of friendliness or happiness" \
image.png
Windows:
$env:OPENAI_API_KEY = "<openai-api-key>"
icrl-gen `
--image-prompt-output image-prompt.txt `
--raw-image-output raw_image.png `
--log-level DEBUG `
"Never assume that what you see on a person’s face is what lies in their heart. A frown is not always intended for you, a smile is not always indicative of friendliness or happiness" `
image.png
To view the options and their descriptions you can run:
icrl-gen --help
to see all available commands.
Code
If you want to call it from Python directly:
from pathlib import Path
from icrl_generator import generate_image
generate_image(
thought="Reality responds to our expectations.",
output=Path("out.png"),
image_prompt_output=Path("prompt.txt"),
raw_image_output=Path("raw.png")
)
Results
Requirements
- Python 3.10+
- LiteLLM API keys properly configured (
export OPENAI_API_KEY=...) - Pillow
- Typer
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icrl_generator-0.0.0.tar.gz.
File metadata
- Download URL: icrl_generator-0.0.0.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69a05f7e670c1d6f4154fb684b0ff41d3921e20a606f3d45101bbd66d1d50af0
|
|
| MD5 |
753d601a08544bd96fdec28c40740d0f
|
|
| BLAKE2b-256 |
78f0701f3d16395f2ed09e57f6bbbc25e0bda6b1bd02ad29ab3ce580a097a2f0
|
Provenance
The following attestation bundles were made for icrl_generator-0.0.0.tar.gz:
Publisher:
publish.yml on HonakerM/icrl-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
icrl_generator-0.0.0.tar.gz -
Subject digest:
69a05f7e670c1d6f4154fb684b0ff41d3921e20a606f3d45101bbd66d1d50af0 - Sigstore transparency entry: 735445085
- Sigstore integration time:
-
Permalink:
HonakerM/icrl-generator@3f7ab5ab419952a12f95c7697d12790f541208e2 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/HonakerM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f7ab5ab419952a12f95c7697d12790f541208e2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file icrl_generator-0.0.0-py3-none-any.whl.
File metadata
- Download URL: icrl_generator-0.0.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3beafda73a1073b2cbc5c809acf239ab96584cd344b028e0f3b891772e03e385
|
|
| MD5 |
8b1eb0459fc62d15ad57082fd816b9b4
|
|
| BLAKE2b-256 |
ed8c26d5c265f91aebd131b5b97ee726b6e176661fe8f3801cdb90438eaecf43
|
Provenance
The following attestation bundles were made for icrl_generator-0.0.0-py3-none-any.whl:
Publisher:
publish.yml on HonakerM/icrl-generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
icrl_generator-0.0.0-py3-none-any.whl -
Subject digest:
3beafda73a1073b2cbc5c809acf239ab96584cd344b028e0f3b891772e03e385 - Sigstore transparency entry: 735445094
- Sigstore integration time:
-
Permalink:
HonakerM/icrl-generator@3f7ab5ab419952a12f95c7697d12790f541208e2 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/HonakerM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f7ab5ab419952a12f95c7697d12790f541208e2 -
Trigger Event:
release
-
Statement type: