Spaces:
Sleeping
A newer version of the Gradio SDK is available:
6.1.0
title: ImageGen AI
emoji: 🖼
colorFrom: purple
colorTo: red
sdk: gradio
sdk_version: 5.25.2
app_file: app.py
pinned: false
license: mit
short_description: AI-Powered Text-to-Image Generator
ImageGen AI
A powerful text-to-image generation application built with Gradio and Hugging Face's diffusers library. This application allows users to generate high-quality images from text descriptions using Stability AI's SDXL-Turbo model.
Features
- Text-to-Image Generation: Create images from text descriptions
- Customizable Parameters: Adjust settings like image size, guidance scale, and inference steps
- Negative Prompts: Specify what you don't want in the generated image
- Image History: View and manage previously generated images
- Save Images: Save your favorite generations to disk
- Example Prompts: Get started quickly with example prompts
Technical Details
This application uses:
- Stability AI's SDXL-Turbo model for fast, high-quality image generation
- Gradio for the user interface
- Hugging Face's diffusers library for the AI backend
- PyTorch as the deep learning framework
Project Structure
app.py: Main entry point for the applicationmodel.py: Model initialization and inference logicui.py: Gradio UI components and layoututils.py: Utility functions for image saving and history managementconfig.py: Configuration settingstest_app.py: Unit tests for the application
Getting Started
Install the required dependencies:
pip install -r requirements.txtRun the application:
python app.pyOpen your browser and navigate to the URL displayed in the terminal (the application will try ports 7860-7869 until it finds an available one)
You can also specify a custom port by setting the GRADIO_SERVER_PORT environment variable:
GRADIO_SERVER_PORT=8000 python app.py
Usage
- Enter a text description in the "Prompt" field
- (Optional) Enter what you want to avoid in the "Negative Prompt" field
- (Optional) Adjust advanced settings like image size, guidance scale, etc.
- Click "Generate Image" and wait for the result
- Save your favorite images using the "Save Image" button
Examples
Try these prompts:
- "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
- "A serene mountain lake with reflections of pine trees"
- "Futuristic cityscape at sunset with flying cars"
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Hugging Face for the diffusers library
- Stability AI for the SDXL-Turbo model
- Gradio for the UI framework
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference