Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distill — AI Content Summarizer

A Flask web app that summarizes YouTube videos and web pages into clean, numbered English summaries using Groq LLMs and LangChain.


Features

  • 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

Project Structure

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

Setup

1. Clone or copy the project

cd YT-Video-Summarizer

2. Create a virtual environment

python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Configure environment

cp .env.example .env
# Edit .env — set SECRET_KEY at minimum

5. Run the app

python run.py

Open http://localhost:5000 in your browser.


Usage

  1. Paste a YouTube URL or any public webpage URL
  2. Enter your Groq API key (get one free at console.groq.com)
  3. Select a model
  4. 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

Getting a Groq API Key

  1. Go to console.groq.com
  2. Sign up or log in
  3. Generate an API key under API Keys

Environment Variables

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)

Extending

  • Add a new model: update GROQ_MODELS in app/config/settings.py
  • Change chunk size: adjust CHUNK_SIZE / CHUNK_OVERLAP in settings
  • Add a new route: create a file in app/routes/ and register the blueprint in app/__init__.py
  • Add output language: modify the prompts in summarizer_service.py

Tech Stack

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

Screenshots

Here are some previews of the application interface and core features.

1. Landing Page

Shows the main interface where users can enter a YouTube or website URL.

Landing Page

2. Input Section

Users can provide the URL, choose the model, and start the summarization process.

Input Section

3. Summary Result

Displays the generated English summary in a clean and readable format.

Summary Result

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages