This is a FastAPI application that allows users to upload YouTube video URLs and ask questions about the video's transcript. The application processes the transcript and uses a language model to answer questions based on the content.
- Extracts transcripts from YouTube videos.
- Allows users to ask questions about the transcript.
- Utilizes OpenAI embeddings for document retrieval.
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create a virtual environment:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.envfile in the root directory and add your OpenAI API key:OPENAI_API_KEY=your_openai_api_key
-
Start the FastAPI server:
python main.py
-
Access the API documentation at
http://localhost:8000/docs.
Returns a simple greeting message.
Response:
{
"message": "Welcome to the YouTube Transcript Chatbot!"
}