This service provides an API to generate YouTube scripts based on a given topic. It uses autogen
with 2 agents (script writer and editor) to generate viral youtube scripts.
- Python 3.9+
- Docker (optional, for containerization)
- Clone the repository:
git clone https://github.com/dachkovski/flask-youtube-script-generator.git
cd flask-youtube-script-generator
- (Optional) Set up a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install the required packages:
pip install -r requirements.txt
python app.py
The service will start and listen on port 5001.
- Build the Docker image:
docker build -t flask-youtube-script-generator .
- Run the Docker container:
docker run -p 5001:5001 flask-youtube-script-generator
Send a POST request to the /submit_script_request
endpoint with the following JSON payload:
{
"topic": "YOUR_TOPIC_HERE",
"style": "VIDEO_STYLE",
"api_key": "YOUR_API_KEY_HERE"
}
The service will respond with a request ID. You can then use this ID to check the status and result of your request by making a GET request to /get_script_result/<request_id>
.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE.md file for details.