This is a Flask application that utilizes a chatbot to interact with YouTube video transcripts. Users can input a YouTube video URL, and the chatbot will generate responses based on the content of the video transcript.
- Fetches YouTube video transcripts using the YouTubeTranscriptApi library.
- Implements a chatbot capable of generating responses to user queries based on the provided transcript.
- Utilizes natural language processing (NLP) techniques such as tokenization, TF-IDF vectorization, and cosine similarity for generating relevant responses.
- Integrates a Generative AI model provided by Google GenAI for enhanced response generation.
- Provides a simple web interface for users to interact with the chatbot.
-
Clone the repository:
git clone https://github.com/AdarshMishra26/TranscriptBot.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the configuration:
- Create a
config.json
file in the project root directory with the following structure:
{ "param": { "API_Key": "your_google_generativeai_api_key" } }
Replace
"your_google_generativeai_api_key"
with your Google GenerativeAI API key. - Create a
-
Run the Flask application:
python app.py
-
Access the application in your web browser at
http://localhost:5000
. -
Enter a YouTube video URL and start chatting with the chatbot.
- For checking the working of the project you can visit at
https://drive.google.com/file/d/1AfrwrjXphI8zMTE80i8TA-49pno2KE9O/view?usp=drivesdk
- For local development, you can run the chatbot directly from the command line using the
TranscriptBot
class intranscript_bot.py
. Use therun_chatbot()
method to interact with the chatbot via the command line.
Contributions are welcome! If you find any bugs or have suggestions for improvement, please open an issue or submit a pull request.