- (just wanted to mention that it is my most liked space till now and also featured in "HF Space of the week" )
A Gradio-powered web app that answers questions about YouTube videos using their transcripts. It extracts the video transcript, splits it into chunks, creates embeddings with Google Generative AI, and performs similarity searches. Responses are generated using the Gemini Pro language model.
- 📄 Extracts transcripts from YouTube videos.
- 🔍 Splits transcripts into manageable chunks.
- 🤖 Creates embeddings for transcript chunks using Google Generative AI.
- 🔗 Performs similarity searches to find relevant transcript sections.
- 📝 Generates detailed responses using the Gemini Pro language model.
- 🖥️ Easy-to-use web interface powered by Gradio.
- Python 3.8 or higher
- pip (Python package installer)
git clone https://github.com/yourusername/youtube-video-ai-assistant.git
cd youtube-video-ai-assistant
pip install -r requirements.txt
API_Key=your_google_api_key_here
python app.py
This will start the Gradio web application. You can access it in your browser at the URL provided in the terminal.
- Enter the YouTube video URL.
- Enter your question about the video.
- Click the submit button to get the response.
- app.py: Main application file containing the Gradio interface and the main functions.
- requirements.txt: List of dependencies required for the project.
- .env: File containing environment variables (not included in the repository for security reasons).
- Transcripts Extraction: The application extracts the transcript from the provided YouTube video URL.
- Text Splitting: The transcript is split into smaller chunks for better processing.
- Embedding Creation: The chunks are converted into embeddings using Google Generative AI.
- Similarity Search: A similarity search is performed on the embeddings to find the most relevant chunks.
- Response Generation: The relevant chunks are fed into the Gemini Pro language model to generate a detailed response to the user's question.
Contributions are welcome! Please fork, open an issue or submit a pull request for any improvements as we all have 1 aim OPEN SOURCE FREEDOM 💫.
- Gradio
- LangChain
- Google Generative AI
- Hugging Face 🤗