YT Bot using RAG

๐ฅ YouTube RAG Assistant
A Streamlit-based app that lets you ask questions or get a summary of any YouTube video using its transcript, powered by RAG (Retrieval-Augmented Generation).
๐ Features
- ๐ Paste a YouTube URL and automatically extract the transcript
- ๐ Supports multi-language transcripts (auto-translates to English for Q&A)
- ๐ค Choose between:
- OpenAI (GPT)
- Gemini (Google)
- Ollama (local LLMs like llama3)
- ๐ฌ Ask custom questions or auto-summarize the entire video
๐ง Setup Instructions
1. Clone the repo & install requirements
git clone https://github.com/Chaganti-Reddy/YT_RAG.git
cd YT_RAG
pip install -r requirements.txt
2. Run the app
streamlit run app.py
Model Support
Currently, only the following models are supported:
Model | Needs API Key | Notes |
---|---|---|
OpenAI | โ Yes | Use GPT-3.5 or GPT-4 |
Gemini | โ Yes | Uses raw API (faster than LangChain wrapper) |
Ollama | โ No | Requires ollama installed locally & model pulled (ollama run llama3) |
Folder Structure
YT_RAG/
โโโ app.py โ Streamlit UI
โโโ query_engine.py โ QA chain logic
โโโ model_selector.py โ Model switcher
โโโ retriever_utils.py โ Vector store builder
โโโ transcript_loader.py โ Transcript & translator
โโโ gemini_direct.py โ Direct Gemini API call
โโโ requirements.txt
โโโ README.md
Tips
- Your questions must be in English (auto translation of transcript is handled).
- Gemini API quotas are low on free tier โ fallback to Ollama if needed.
- Works great with videos that have auto-generated subtitles.