Custom Image Generator is a web-based application that allows users to generate images from textual descriptions using OpenAI's DALL-E model. The app is built using Flask for the backend and Bootstrap for the frontend. It leverages OpenAI's API to create AI-generated images based on user input and displays the generated image directly on the page.
Before you begin, ensure you have the following installed on your local machine:
Clone the repository:
git clone https://github.com/yourusername/Custom-Image-Generator.git cd Custom-Image-Generator
Install the required dependencies:
Install the dependencies specified:
pip install boltiotai
Set up your OpenAI API Key:
Export your OpenAI API key as an environment variable.
On Linux/macOS, run:
export OPENAI_API_KEY='your-openai-api-key'
On Windows:
cmd set OPENAI_API_KEY='your-openai-api-key'
Configure the OpenAI API:
In the Python script, make sure that the OpenAI API key is correctly imported from your environment variables:
python openai.api_key = os.environ['OPENAI_API_KEY']
Running the Application:
Run the Flask application with the following command:
python app.py
By default, the app will run on localhost:8080. You can access it by navigating to:
http://localhost:8080
Contributions are welcomed!Fork the repo and submit a pull request with your changes.
This project demonstrates how to use OpenAI's DALL-E model with Flask to build a simple and interactive image generator. The app is extendable, and you can modify it to add more features or enhance the user interface. Feel free to contribute and make this project better!
This README.md provides all the essential details and instructions for users to set up, run, and contribute to your Custom Image Generator project.