A Flask web app that summarizes YouTube videos and web pages into clean, numbered English summaries using Groq LLMs and LangChain.
- YouTube support — auto-detects the URL, fetches the transcript (with language fallback and auto-translation to English)
- Website support — scrapes and cleans article/page content
- Chunk-based summarization — handles long content via a two-pass map-reduce pipeline
- Model selection — choose between Groq's available LLMs
- English-only output — always produces a structured English summary
- Dark editorial UI — polished, responsive, no frameworks required
summarizer/
├── app/
│ ├── __init__.py # Flask app factory
│ ├── config/
│ │ └── settings.py # Config class (reads .env)
│ ├── routes/
│ │ └── main.py # Flask routes (GET / and POST /summarize)
│ ├── services/
│ │ ├── youtube_service.py # YouTube transcript loading
│ │ ├── website_service.py # Web content loading
│ │ └── summarizer_service.py # LLM chain + chunking
│ ├── utils/
│ │ └── url_helpers.py # URL validation and parsing
│ ├── templates/
│ │ └── index.html # Main page (Jinja2)
│ └── static/
│ ├── css/style.css # Design system
│ └── js/app.js # Frontend logic
├── run.py # Entry point
├── requirements.txt
├── .env.example
├── .gitignore
├── Data/
├── research/
├── asset/
└── README.md
cd YT-Video-Summarizerpython -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activatepip install -r requirements.txtcp .env.example .env
# Edit .env — set SECRET_KEY at minimumpython run.pyOpen http://localhost:5000 in your browser.
- Paste a YouTube URL or any public webpage URL
- Enter your Groq API key (get one free at console.groq.com)
- Select a model
- Click Summarize
The app will:
- Load the content (transcript or web page)
- Split it into overlapping chunks
- Run each chunk through a first-pass bullet summarizer
- Combine all partials and produce a final structured English summary
- Go to console.groq.com
- Sign up or log in
- Generate an API key under API Keys
| Variable | Required | Description |
|---|---|---|
SECRET_KEY |
Yes | Flask session secret (set a long random string in production) |
FLASK_DEBUG |
No | Set true for dev auto-reload (default: false) |
- Add a new model: update
GROQ_MODELSinapp/config/settings.py - Change chunk size: adjust
CHUNK_SIZE/CHUNK_OVERLAPin settings - Add a new route: create a file in
app/routes/and register the blueprint inapp/__init__.py - Add output language: modify the prompts in
summarizer_service.py
| Layer | Technology |
|---|---|
| Backend | Python 3.11+, Flask 3 |
| LLM | Groq API via langchain-groq |
| Chains | LangChain Core + Text Splitters |
| YouTube | youtube-transcript-api |
| Web scraping | langchain-community UnstructuredURLLoader |
| Frontend | Vanilla HTML/CSS/JS (no framework) |
| Fonts | Playfair Display, DM Sans, DM Mono |
Here are some previews of the application interface and core features.
Shows the main interface where users can enter a YouTube or website URL.
Users can provide the URL, choose the model, and start the summarization process.
Displays the generated English summary in a clean and readable format.


