A simple but powerful Python tool that lets you ask questions about any YouTube video using its transcript.
Powered by LangChain + Google Gemini.
- Fetch transcripts from YouTube videos
- Ask natural language questions about the video content
- Get accurate answers based on the transcript
- Lightweight and easy to run locally
- Python
- LangChain
- Google Gemini (via langchain-google-genai)
- youtube-transcript-api
git clone https://github.com/ShayanAliProgrammer/youtube-ai.git
cd youtube-ai
pip install -r requirements.txtNote: You will need a Google Gemini API key.
python main.py- Paste a YouTube video URL
- Ask any question about the video
- Get the answer generated from the transcript
Enter a YouTube video URL: https://www.youtube.com/watch?v=...
Prompt: What is the main topic of this video?
Answer: ...
MIT