Skip to content

tuananhfrtk/Filtered-Prompts2Video-Agent-

Repository files navigation

Filtered Prompt2Video Agent

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.

Table of Contents

Features

  • Enhance prompts for video generation.
  • Generate videos using AI models.
  • Upload generated videos to Google Drive.
  • User-friendly interface with Streamlit.

Requirements

  • Python 3.8 or higher
  • Required packages listed in requirements.txt

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required packages:

    pip install -r requirements.txt
  4. 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
    

Running the Application

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.

Usage

  1. Select Prompts: Choose harmful prompts from the database to process.
  2. Enhance Prompts: Use the auto-enhance feature or manually edit the prompts.
  3. Generate Videos: Click the button to generate videos based on the enhanced prompts.
  4. View Results: Watch the generated videos and download them from Google Drive.

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages