SmartTube is a local semantic search engine that allows you to search through a YouTube channel's videos using natural language. It indexes video transcripts and metadata to find the most relevant content.
- Semantic Search: Find videos by meaning, not just keywords.
- Transcript Indexing: Searches through the actual spoken content of videos.
- Model Evaluation: Compare different embedding models.
- Gradio UI: Simple web interface for searching.
- Clone the repository (or download the files).
- Install Dependencies:
You can install the package and its dependencies using pip:
Or strictly from requirements:
pip install -e .pip install -r requirements.txt
- Environment Setup:
Create a
.envfile in the root directory (copy from.env.example).YT_API_KEY=your_api_key CHANNEL_ID=your_channel_id
Fetch video metadata and transcripts.
python src/data/fetch_youtube.py
python src/data/fetch_transcripts.py
python src/data/preprocess.pyGenerate embeddings and build the FAISS index.
python src/embeddings/build_index.py --model all-MiniLM-L6-v2Launch the Gradio interface.
python src/ui/app_gradio.pyOpen your browser at http://localhost:7860.
Evaluate different models.
python src/embeddings/evaluate_models.pyBuild and run using Docker:
docker build -t querytube .
docker run -p 7860:7860 querytubeSee docs/architecture.md for details.