How jatin-mehra119/ai-powered-youtube-video-summarizer-and-fact-checker works
Project type and purpose
• This is a full-stack AI-powered web application that extracts YouTube video captions, builds searchable embeddings, provides summarization and fact-checking, and exposes both a Streamlit UI and a FastAPI backend.
File structure
• At the root you have:
• Docker-related files (.dockerignore, Dockerfile)
• The FastAPI app entrypoint (main.py) and its docs (fastapi_APP_info.md)
• A Streamlit UI under src/UI/app.py
• A caption-capture module under src/CC_capture
• A “Database” folder with FAISS index logic
• A pipelines folder with embedding, search, and fact_checker logic
• Requirements, license, README, and a sample captions.csv
• Patterns:
• Separation of concerns: UI (Streamlit), API (FastAPI), data pipelines, data storage (CSV + FAISS), external integrations (YouTube via yt-dlp, Groq API, Crawl4AI).
Extract key architectural notes from the README
• Users enter a YouTube URL in the UI
• The system extracts, cleans, and stores captions (CSV)
• Captions → sentence embeddings → FAISS index
• UI search queries hit the FAISS index for nearest neighbors
• Summaries and fact-checks use an LLM via GroqAPI + external crawl (Crawl4AI)
• Deployed as a container on a GCP VM
Main components
a. Frontend: Streamlit App
b. Backend: FastAPI App
c. Caption Capture Service (yt-dlp + load_cc)
d. Embedding Pipeline (SentenceTransformers)
e. FAISS Index (search)
f. Fact-Checking Pipeline (Groq API + Crawl4AI)
g. Data Storage: CSV on disk + FAISS index file
h. External Services: YouTube, Groq API, Crawl4AI
i. Orchestration / Hosting: Docker container(s) on GCP VM
Relationships and interactions
• User → Streamlit UI: inputs URL or search query
• UI → FastAPI (REST calls) for:
• Fetch & store captions
• Build embeddings & FAISS index
• Search captions
• Summarize + fact-check
• FastAPI → CC_capture to fetch captions from YouTube
• FastAPI → pipelines/embedding to generate embeddings
• FastAPI → Database/faiss_search to build and query FAISS
• FastAPI → pipelines/fact_checker to call Groq API + Crawl4AI
• FastAPI → Disk (captions.csv, faiss_index.bin)
Architectural patterns & design principles
• Layered architecture: UI / API / Data / External Integrations
• Modular pipelines for each major function (extraction, embedding, search, fact-checking)
• Cohesion: each module has a single responsibility
• Separation of deployment concerns: containerizable services
Relevant technologies & frameworks
• Python, FastAPI (backend), Streamlit (frontend)
• yt-dlp for caption retrieval
• pandas for CSV processing
• SentenceTransformers + FAISS for embedding & search
• Groq API & Crawl4AI for fact-checking
• Docker, GCP VM for deployment