RY
ryma-tharouma/youtube-summarizer-with-gemma
a simple Streamlit app that summarizes the transcript of any YouTube video using google gemma 3 model.
๐ฅ YouTube Video Summarizer
Summarize YouTube videos effortlessly using Google Gemini (Gemma), automatic transcript extraction, and punctuation restoration. This lightweight Streamlit app transforms video content into clear and structured summaries with just a video link.
๐ Features
- ๐ Accepts any YouTube video URL format
- ๐ง Choose between 3 summary types:
- General โ well-structured overview
- Short โ concise 5-line summary
- Technical โ structured insight for technical content
- โ๏ธ Restores punctuation to improve readability
- ๐พ Download summary as a Markdown (
.md) file - ๐ Keeps your API key secure using
.env
๐ฆ Installation
1. Clone the repository
git clone https://github.com/ryma-tharouma/youtube-summarizer-with-gemma.git
cd youtube-video-summarizer2. Install dependencies
pip install -r requirements.txt3. Add your Gemini API key
Create a .env file in the project root:
gemma3n_api_key=your_gemma_api_key_here๐ Get your key from Google AI Studio
โถ๏ธ Run the App
streamlit run app.py๐ง How It Works
- Extracts Video ID โ using a robust regex-based function
- Fetches Transcript โ using
YouTubeTranscriptApi - Restores Punctuation โ with a multilingual punctuation model
- Summarizes Content โ with structured prompts using Gemini
- Outputs โ Markdown summary ready to view or download
โ Supported YouTube URLs
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://m.youtube.com/watch?v=VIDEO_ID
๐ File Structure
.
โโโ app.py
โโโ requirements.txt
โโโ .env.example
โโโ README.md
โโโ screenshots/
โโโ app_demo.png๐งฐ Tech Stack
- Python 3.8+
- Streamlit
- Google Generative AI (Gemma)
- YouTubeTranscriptApi
- DeepMultilingualPunctuation
- python-dotenv