--- title: Image_Generator app_file: UI.py sdk: gradio sdk_version: 5.49.1 --- # README.md ````md # ๐ŸŽจ DALLยทE AI Image Generator Modern AI-powered Text-to-Image Generator built using: - Python - Gradio - OpenAI DALLยทE API - Modern Glassmorphism UI --- # โœจ Features - Modern premium UI - AI image generation - OpenAI GPT Image API support - Prompt history - Download generated images - Retry mechanism - Error handling - Responsive design - Dark mode aesthetic - Queue support - Automatic image saving --- # ๐Ÿ“‚ Project Structure project/ โ”‚ โ”œโ”€โ”€ app.py โ”œโ”€โ”€ UI.py โ”œโ”€โ”€ requirements.txt โ”œโ”€โ”€ README.md โ”œโ”€โ”€ .env โ”‚ โ”œโ”€โ”€ generated_images/ โ”‚ โ””โ”€โ”€ logs/ โ””โ”€โ”€ app.log --- # ๐Ÿš€ Installation ## 1. Clone Project ```bash git clone cd project ```` --- ## 2. Create Virtual Environment ### Windows ```bash python -m venv venv venv\\Scripts\\activate ``` ### Mac/Linux ```bash python3 -m venv venv source venv/bin/activate ``` --- ## 3. Install Dependencies ```bash pip install -r requirements.txt ``` --- # ๐Ÿ”‘ Environment Setup Create a `.env` file in the root directory: ```env OPENAI_API_KEY=your_api_key_here ``` --- # โ–ถ๏ธ Run Application ```bash python UI.py ``` Application will start locally at: ```txt http://127.0.0.1:7860 ``` --- # ๐Ÿ–ผ๏ธ Example Prompts * A futuristic cyberpunk city at night * Ultra realistic samurai warrior * Fantasy floating island above clouds * Anime-style Tokyo street * Astronaut riding horse on Mars --- # โš™๏ธ Supported Settings ## Image Sizes * 1024x1024 * 1024x1792 * 1792x1024 ## Quality * low * medium * high ## Styles * vivid * natural --- # ๐Ÿ“ Generated Images All generated images are automatically saved inside: ```txt generated_images/ ``` --- # ๐Ÿ“œ Logs Application logs are stored inside: ```txt logs/app.log ``` --- # โŒ Error Handling The application handles: * Empty prompts * API failures * Invalid API keys * Network issues * Timeout errors * Rate limits --- # ๐Ÿ› ๏ธ Tech Stack * Python 3.11+ * Gradio * OpenAI SDK * Pillow * Requests * python-dotenv --- # ๐Ÿ”ฎ Future Improvements * Multi-image generation * Image editing * AI upscaling * Prompt enhancement * Authentication system * Database support * Cloud deployment * Docker support --- # โค๏ธ Credits Built with: * Gradio * OpenAI * Python --- # ๐Ÿ“„ License MIT License ``` ```