Skip to content

Amithtraj/ai-image-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 AI Art Gallery

A modern web application that generates AI-powered artwork using Stable Diffusion. Create, store, and showcase your AI-generated masterpieces!

✨ Features

  • 🖼️ AI Image Generation using Stable Diffusion
  • 👥 User Authentication System
  • 🗃️ Image Gallery with Storage
  • 🎯 Simple and Intuitive UI
  • 🔒 Secure File Handling

🛠️ Tech Stack

  • 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

📋 Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Git
  • Access to Stable Diffusion API

🚀 Setup Instructions

1. Clone the Repository

git clone <repository-url>
cd aiartgallery

2. Set Up Virtual Environment (Recommended)

# Windows
python -m venv venv
venv\Scripts\activate

# Linux/MacOS
python3 -m venv venv
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Environment Configuration

Create 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 .env file to version control. Make sure it's listed in your .gitignore.

5. Database Setup

python manage.py migrate

6. Create Admin Account

python manage.py createsuperuser

7. Start Development Server

python manage.py runserver

Access the application at http://localhost:8000

📱 Usage

  1. Register/Login: Create an account or login to start generating images
  2. Generate Images: Click on "Generate" and enter your prompt
  3. View Gallery: Browse through your generated images
  4. Admin Panel: Access admin interface at /admin to manage users and images

🔒 Security Features

  • CSRF protection enabled
  • User authentication required for sensitive operations
  • Secure media file handling
  • Django's built-in security features

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Troubleshooting

Common Issues

  1. Database Errors

    • Ensure migrations are applied
    • Check database configuration in settings.py
  2. Static Files Not Loading

    • Run python manage.py collectstatic
    • Check STATIC_URL and STATIC_ROOT in settings.py
  3. Image Generation Fails

    • Verify Stable Diffusion API key
    • Check API endpoint availability
    • Ensure proper network connectivity

📞 Support

For support, please open an issue in the repository or contact the maintainers.

About

A modern web application that generates AI-powered artwork using Stable Diffusion. Create, store, and showcase your AI-generated masterpieces!

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors