This Rust project is a simple yet fun application that generates ASCII art from images. It uses the OpenAI API to generate images based on text prompts and then converts these images into ASCII art.
- Image Generation: Utilizes OpenAI's image generation capabilities to create images based on user-provided prompts.
- ASCII Art Conversion: Converts the generated images into ASCII art.
- Rust programming environment.
openai_api_rs
crate for OpenAI API integration.image
crate for image processing.reqwest
crate for HTTP requests.
-
Clone the repository:
git clone https://github.com/leoforney/dalle-ascii
-
Navigate to the project directory:
cd dalle-ascii
-
Build the project:
cargo build --release
-
Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY=[Your OpenAI API Key]
-
Run the program with a prompt:
./target/release/dalle-ascii "Your image prompt"
Ensure to enclose the prompt in double quotes if it contains spaces.
-
The program will output ASCII art based on the given prompt.
Feel free to fork the repository and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for their image generation API.
- Creators of the
openai_api_rs
,image
, andreqwest
crates.