CoolFace
Apppublic

Vikas2425/YouTube-RAG-Assistant

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
App README

YouTube Transcript RAG Chatbot

An end-to-end Retrieval-Augmented Generation (RAG) application built with a modular architectural approach. This project allows users to perform semantic searches and have natural conversations based on any YouTube video's content using Llama-3 and FAISS.


Key Features

  • —Automated Ingestion: Fetches transcripts directly from YouTube URLs using yt-dlp.
  • —Hybrid Ingestion: Added support for Manual Transcript Paste to ensure 100% reliability if automated fetching fails.
  • —Modular Transformation: Cleans raw text, removes timestamps, and generates recursive character chunks for better context retrieval.
  • —Vector Search: Utilizes HuggingFaceEmbeddings and FAISS for high-performance similarity mapping.
  • —LLM Integration: Powered by Meta Llama-3-8B-Instruct via HuggingFace Inference API for accurate, context-aware responses.
  • —Streamlit UI: A clean, professional chat dashboard for real-time processing and interaction.
  • —Deployment Ready: Containerized using Docker and hosted on Hugging Face Spaces.

Project Architecture

The project follows professional software engineering practices with a decoupled folder structure:

  1. 1.Data Ingestion: Extracts transcript data from YouTube or handles manual user input.
  2. 2.Data Transformation: Processes text and saves serialized chunk objects.
  3. 3.Vector Store: Creates and saves the FAISS index in the artifacts/ directory.
  4. 4.RAG Pipeline: Integrates the retriever with the LLM using LangChain.

Tech Stack

  • —Language: Python 3.10+
  • —Frameworks: LangChain, Streamlit
  • —Embeddings: all-MiniLM-L6-v2 (Sentence-Transformers)
  • —Vector Database: FAISS (Facebook AI Similarity Search)
  • —LLM: Meta Llama-3-8B-Instruct (HuggingFace API)

Deployment Information

  • —Infrastructure: The application is containerized using a Dockerfile to ensure environment consistency across different systems.
  • —Platform: Hosted on Hugging Face Spaces, utilizing their high-performance hardware for seamless LLM inference.
  • —Security: Sensitive API keys (HuggingFace Token) are managed through Environment Secrets to prevent exposure.
  • —CI/CD: Integrated with a version control pipeline for automated builds and deployment updates.

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference