This application allows users to generate images based on text prompts using a stable diffusion model. Once an image is generated, it will be uploaded to Google Drive and a shareable link will be emailed to the user. Currently, video generation is not implemented, but the image generation process is fully functional.
- Generate Image: Provide a text prompt, and an image will be generated using the model.
- Email Notification: After the image is generated and uploaded to Google Drive, a shareable link is sent to the email provided by the user.
- Image Upload: The generated image is uploaded to a Google Drive folder for easy sharing.
- Tracking Process: The application tracks the status of the generated content (e.g., processing, completed).
Before running the application, make sure you have the following installed:
- Python 3.x
- Flask
- SQLAlchemy (for database management)
- Google API Client (for interacting with Google Drive)
- A Hugging Face API Token (for image generation)
-
Clone the repository:
git clone https://github.com/your-repository.git cd your-repository
-
Install dependencies:
pip install -r requirements.txt
-
Set up the environment variable in .env or terminal file:
HUGGING_FACE_TOKEN
: Your Hugging Face API Token.SENDER_EMAIL
: The email of the sender.SENDER_PASSWORD
: The chosen password of the app inside chrome.
-
Set up the database (SQLite is used):
- Make sure you have SQLite installed on your system. SQLite comes pre-installed with Python, so no additional installation should be needed.
- The application uses SQLAlchemy for database management. When the application starts, it will automatically create the necessary tables in the SQLite database.
# To add in the database python database/models.py
- Start the application:
- Run the following command to start the Flask app:
python main.py
2 Access the app:
- The application will be available at
http://127.0.0.1:5000/
by default.
- Navigate to the
/generate
page in your browser. - Provide a description of the image you want to generate.
- Choose whether you want to generate an image or video (currently, only image generation is functional).
- After submission, the image will be generated and uploaded to Google Drive.
- You will receive an email with the generated image link once the process is complete.
- The user provides a text prompt for the image they want to generate.
- The user submits their email address to receive the shareable link once the image is generated.
- The text prompt is passed to a stable diffusion model, which generates the corresponding image.
- The generated image is uploaded to a Google Drive folder, and a unique shareable link is created.
- A shareable link is sent to the email address provided by the user.
- The application stores the generated content in the database, with a status field indicating the generation process (e.g., Processing, Completed).
For any inquiries or support, feel free to reach out to us