How abhishekadbhute-create/hi works
This repository is a small notebook-style YouTube transcript question-answering chatbot. It fetches a video transcript, chunks and indexes it, retrieves relevant chunks for a rewritten question, and asks a Hugging Face-hosted model to answer from the retrieved context and in-memory chat history. The single source file supports the relationships shown; there is no separate user interface or persistent history store.
Main entry points: code.py Question handler
Components 14
Transcript indexing
- Transcript fetch
code.py - Text chunking
code.py - Text embeddings
code.py - FAISS index
code.py
Question retrieval
- Question handler
code.py - Query rewrite
code.py - Chunk retriever
code.py
Answer generation
- Chat history
code.py - Answer prompt
code.py - Model call
code.py - Output parser
code.py
Other components
- Questioner
- YouTube captions
- Hugging Face inference
Connections 15
- YouTube captions → Transcript fetch: provides captions
code.py - Transcript fetch → Text chunking: splits transcript
code.py - Text chunking → Text embeddings: embeds chunks
code.py - Text embeddings → FAISS index: indexes vectors
code.py - Questioner → Question handler: asks question
code.py - Question handler → Query rewrite: formats query
code.py - Question handler → Chunk retriever: retrieves chunks
code.py - Chunk retriever → FAISS index: searches index
code.py - Question handler → Answer prompt: supplies context
code.py - Question handler → Chat history: reads and appends
code.py - Answer prompt → Model call: builds prompt
code.py - Model call → Hugging Face inference: requests completion
code.py - Model call → Output parser: parses response
code.py - Output parser → Question handler: returns answer
code.py - Question handler → Questioner: returns answer
code.py