YT Web Summarizer

AI-powered tool to transform YouTube videos and web articles into concise summaries

AI-powered tool to transform YouTube videos and web articles into concise summaries

WhisperLangChainGroqLlama-3.3-70bStreamlitBeautifulSoupyt-dlpAudio Processing

Overview

YT Web Summarizer is an AI-powered summarization tool that transforms YouTube videos and web articles into concise, actionable summaries. Built with production-ready Python and deployed on Hugging Face Spaces, it features automatic transcription using OpenAI Whisper and intelligent summarization with Groq's Llama-3.3-70b model.

The system includes smart caching to reduce API costs by ~70%, 5 summary styles, rate limiting, export options, and comprehensive statistics tracking for optimal user experience.

Key Features

YouTube Transcription

Automatic audio extraction and transcription using OpenAI Whisper with 5 model size options (Tiny, Base, Small, Medium, Large) for speed/accuracy trade-offs.

Website Summarization

Extract and summarize content from any web article using BeautifulSoup4 for clean text extraction and intelligent content parsing.

5 Summary Styles

Bullet points, paragraphs, key insights, Q&A format, or executive summary with customizable summary length (50-500 words).

Smart Caching

Intelligent caching system reduces API costs by ~70% by storing recent summaries for instant access without redundant processing.

Statistics & Analysis

Word count, reading time estimates, content type analysis, and performance metrics for each summarization.

Export & History

Download summaries as text files, copy to clipboard, and track recent summarization history for easy reference.

System Architecture

Complete System Flow

End-to-end pipeline from YouTube/Web input to AI-powered summarization with caching and export

YT Web Summarizer System Architecture

Summary Styles

๐Ÿ“ Bullet Points

Quick, scannable list of key points

Best for: Fast reference, meeting notes

๐Ÿ“ Paragraph

Flowing narrative summary

Best for: Reports, blog posts

๐Ÿ’ก Key Insights

Most important takeaways

Best for: Executive reviews

โ“ Q&A Format

Question and answer pairs

Best for: Training, FAQs

๐Ÿ“Š Executive Summary

Business-focused overview

Best for: Decision makers

Whisper Model Options

ModelSpeedAccuracyUse Case
TinyVery FastLowShort videos, quick tests
BaseFastMediumRecommended - Best balance
SmallModerateHighLonger content, better accuracy
MediumSlowVery HighProfessional transcription
LargeVery SlowVery HighGPU required, highest quality

Tech Stack

AI & LLM

Groq CloudLlama-3.3-70bOpenAI WhisperLangChain

Video & Web Processing

yt-dlpBeautifulSoup4FFmpegLibrosa

Framework & Deployment

Streamlit 1.40Python 3.10Hugging Face Spaces

System Architecture

Modular Design

Built with production-ready Python featuring 7 focused modules: services, utils, config, logging, exceptions, with full type hints and comprehensive error handling.

๐Ÿ“ฆ services/ - Core business logic
๐Ÿ› ๏ธ utils/ - Helper functions
โš™๏ธ config/ - Environment settings
๐Ÿ“ logging/ - Structured logging
โŒ exceptions/ - Error hierarchy
๐Ÿงช tests/ - 30+ unit tests (80%+ coverage)

Processing Pipeline

User Input (YouTube URL / Website URL)
โ†“
[YouTube] Audio Extraction โ†’ Whisper Transcription
[Website] HTML Fetch โ†’ BeautifulSoup Extraction
โ†“
Text Preprocessing & Chunking
โ†“
LangChain + Groq (Llama-3.3-70b) Summarization
โ†“
Cache Storage + Statistics Generation
โ†“
Display Summary + Export Options

Implementation Highlights

โ–นSmart Caching: Intelligent cache system reduces API costs by ~70% by storing recent summaries for instant retrieval
โ–นGPU Support: Automatic GPU detection for faster video processing with Whisper models
โ–นRate Limiting: Built-in protection against excessive API usage with configurable limits
โ–นComprehensive Testing: 30+ unit tests with 80%+ code coverage for reliability
โ–นStructured Logging: Color-coded logging with detailed error tracking for debugging
โ–นType Safety: Full type hints throughout codebase for better IDE support and error prevention

Pro Tips

โœ…Use base Whisper model for optimal speed/accuracy
โœ…Summaries of 200-300 words are typically most focused
โœ…Cache automatically saves recent summaries for instant access
โœ…GPU acceleration activates automatically when available
โœ…Works with any public YouTube video or web article
โœ…API key stored only for session, never saved permanently

Future Improvements

Hierarchical summaries (bullet โ†’ paragraph โ†’ detailed)
Semantic redundancy detection across chunks
User-controlled summary depth and format
Batch processing for multiple URLs
Multi-language support for transcription
PDF and document summarization support