A modern web application that generates AI-powered artwork using Stable Diffusion. Create, store, and showcase your AI-generated masterpieces!
- 🖼️ AI Image Generation using Stable Diffusion
- 👥 User Authentication System
- 🗃️ Image Gallery with Storage
- 🎯 Simple and Intuitive UI
- 🔒 Secure File Handling
- Django 4.2 - Web Framework
- Bootstrap 5.1.3 - Frontend Styling
- Crispy Forms with Bootstrap 4 - Form Handling
- Animate.css - Smooth Animations
- Font Awesome 5.15.4 - Icons
- SQLite - Database
- Python 3.8 or higher
- pip (Python package manager)
- Git
- Access to Stable Diffusion API
git clone <repository-url>
cd aiartgallery# Windows
python -m venv venv
venv\Scripts\activate
# Linux/MacOS
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root directory with the following variables:
# Django Settings
SECRET_KEY=your_django_secret_key
DEBUG=True # Set to False in production
ALLOWED_HOSTS=localhost,127.0.0.1
# AI Image Generation
STABLE_DIFFUSION_API_KEY=your_api_key
# Optional Email Settings (for password reset)
EMAIL_HOST=smtp.your-email-provider.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@example.com
EMAIL_HOST_PASSWORD=your-email-password
⚠️ Never commit the.envfile to version control. Make sure it's listed in your.gitignore.
python manage.py migratepython manage.py createsuperuserpython manage.py runserverAccess the application at http://localhost:8000
- Register/Login: Create an account or login to start generating images
- Generate Images: Click on "Generate" and enter your prompt
- View Gallery: Browse through your generated images
- Admin Panel: Access admin interface at
/adminto manage users and images
- CSRF protection enabled
- User authentication required for sensitive operations
- Secure media file handling
- Django's built-in security features
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
-
Database Errors
- Ensure migrations are applied
- Check database configuration in settings.py
-
Static Files Not Loading
- Run
python manage.py collectstatic - Check STATIC_URL and STATIC_ROOT in settings.py
- Run
-
Image Generation Fails
- Verify Stable Diffusion API key
- Check API endpoint availability
- Ensure proper network connectivity
For support, please open an issue in the repository or contact the maintainers.