This application explore an agentic workflow by leverage LangGraph and PydanticAI, to transform raw prompts into a refined version before putting into an AI Video Generator and exports everything to a CSV file.
- Enhance prompts for video generation.
- Generate videos using AI models.
- Upload generated videos to Google Drive.
- User-friendly interface with Streamlit.
- Python 3.8 or higher
- Required packages listed in
requirements.txt
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Set up environment variables: Create a
.env
file in the root directory and add the following variables:BASE_URL=https://api.groq.com/openai/v1 GROQ_API_KEY=<your_groq_api_key> RUNWAY_API_KEY=<your_runway_api_key> GOOGLE_DRIVE_CREDS=<your_google_drive_credentials> OUTPUT_DIR=outputs DATASET_PATH=./prompts.csv
To run the application, execute the following command:
python streamlit_ui.py
This will start the Streamlit server, and you can access the application in your web browser at http://localhost:8501
.
- Select Prompts: Choose harmful prompts from the database to process.
- Enhance Prompts: Use the auto-enhance feature or manually edit the prompts.
- Generate Videos: Click the button to generate videos based on the enhanced prompts.
- View Results: Watch the generated videos and download them from Google Drive.
This project is licensed under the MIT License. See the LICENSE file for details.