This app lets you ask questions about any YouTube video. It loads the transcript, splits it into chunks, converts text to vectors, and uses an AI model to answer your questions based on the video content.
app.py: Main Streamlit app.src/: Contains all helper code, organized by feature.loaders/: Loads YouTube transcripts.splitters/: Splits text into chunks.embeddings/: Converts text to vectors.vectorstore/: Stores and loads vector data.llm/: Loads the AI model.chains/: Builds the question-answering logic.utils/: Extra helpers (like prompts).
data/: Stores FAISS index files (auto-created)..env: Store your API keys here (never share this file!)..gitignore: Protects sensitive files and folders from being uploaded to GitHub.
Edit src/config.py to change:
- Where data is stored (
FAISS_PATH) - Which embedding model is used (
EMBEDDING_MODEL_NAME) - Which AI model is used (
LLM_MODEL_NAME)
- Your
.envfile anddata/folder are ignored by Git thanks to.gitignore. - Never share your API keys or
.envfile.
- Install requirements:
pip install -r requirements.txt - Add your API keys to
.env(see example in.env) - Run the app:
streamlit run app.py - Enter a YouTube URL, process the video, and ask questions!