This project is a web-based AI system that generates images and videos based on user-provided text prompts. It utilizes Stable Diffusion for image generation and FFmpeg for video generation, offering an intuitive interface for users to generate and view their content.
- User Authentication: Simple login page using a unique User ID.
- Image Generation: Generate high-quality images from text prompts.
- Video Generation: Create videos by combining a series of AI-generated images.
- Gallery: View generated images and videos in a grid layout.
- Notifications: Alert users when their content is ready.
- Backend: Python, Flask
- AI Models: Stable Diffusion (via the
diffusers
library) - Video Processing: FFmpeg
- Frontend: HTML, CSS
- Database: SQLite (for managing content)
- Python 3.8 or above
- FFmpeg installed (Download FFmpeg)
- Git
-
Clone the Repository:
git clone https://github.com/your-username/ai-image-video-gen.git cd ai-image-video-gen
-
Set Up Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up Environment Variables: Create a
.env
file in the root directory with the following content:FLASK_APP=web_app.py FLASK_ENV=development SECRET_KEY=your_secret_key
-
Run the Application:
flask run
-
Access the Web App: Open http://127.0.0.1:5000 in your browser.
.
├── static/
│ ├── images/ # Generated images
│ ├── videos/ # Generated videos
├── templates/
│ ├── login.html # Login page
│ ├── gallery.html # Gallery page
├── .env # Environment variables
├── requirements.txt # Python dependencies
├── web_app.py # Main Flask app
├── generation.py # Image and video generation logic
├── models.py # Database models
├── notifications.py # Notification handling
└── README.md # Project documentation
- Login: Enter your unique User ID to access the system.
- Generate Content: Prompts like
A futuristic city at sunset
will generate corresponding images and videos. - View Gallery: Check the generated content in the gallery.
Feel free to fork this repository and create pull requests for new features or fixes. Contributions are welcome!
This project is licensed under the MIT License. See the LICENSE file for details.
For any queries, please contact:
- Name: Shardul More
- Email: [email protected]