Project Overview
ByteBrief is a multi‑modal AI summarization platform that combines BERT extractive and BART abstractive models to produce concise, context‑aware summaries. It supports a wide range of input sources – text, uploaded files (TXT, PDF, DOCX, PPT, images), YouTube URLs, and audio files – and generates summaries with optional keyword guidance, sentiment analysis, topic modeling, and word cloud visualisations.
Built as a production‑ready application with Streamlit and FastAPI, ByteBrief is designed for researchers, journalists, students, and professionals who need to quickly distill large volumes of content into digestible insights.
Problem Statement
In the age of information overload, extracting key insights from long documents, videos, podcasts, and images is time‑consuming and prone to human error. Traditional summarization tools are often limited to a single modality (text only) or rely on either extractive or abstractive methods, leading to summaries that are either disjointed or not faithful to the source.
ByteBrief addresses this by offering a hybrid summarization approach that first extracts the most important sentences (using BERT) and then abstracts them concisely (using BART). It also ingests multimodal inputs – text, images (via OCR), audio (via Whisper), and YouTube transcripts – making it a truly versatile tool.
Architecture
ByteBrief follows a modular pipeline with the following components:
- Input Extractors: Dedicated modules for text, files (PDF, DOCX, PPT, images via EasyOCR), YouTube (transcript extraction + fallback to Whisper), and audio (MP3/WAV via Whisper).
- Hybrid Summarizer: Combines BERT extractive (selects top‑K sentences) with BART abstractive (rewrites them concisely) – handles long texts via overlap chunking.
- Analytics Module: Sentiment analysis (DistilBERT), keyword extraction (KeyBERT), LDA topic modeling, and word cloud generation.
- Export: Download summaries as DOCX, PDF, or TXT.
- Frontend & API: Streamlit UI for interactive use, FastAPI for programmatic access (optional).
All components are orchestrated via a configurable pipeline, with models cached for faster subsequent runs.
Summarization Pipeline
1. Extractive Stage (BERT)
The source text is passed through a BERT‑based extractive summarizer (bert-extractive-summarizer) which ranks sentences by importance and selects the top‑K sentences that best represent the content. This step ensures that the most salient points are preserved.
2. Abstractive Stage (BART)
The extracted sentences are fed into Facebook BART (large-cnn) via Hugging Face Transformers. BART generates a fluent, human‑like summary by paraphrasing and condensing the extracted content, often improving readability and coherence.
3. Keyword‑Guided Summaries (Optional)
Users can enable keyword‑guided summarization using KeyBERT. The model extracts key topics and weights the summary generation to focus on those terms, resulting in summaries that are more relevant to specific interests.
4. Long‑Text Handling
For documents exceeding BART's token limit (1024 tokens), the system uses a chunking strategy (described below) to split the text, summarise each chunk, and then refine the combined result for a final coherent summary.
Key Features
- Multi‑Input Sources: Text, uploaded files (TXT, PDF, DOCX, PPT, images), YouTube URLs, audio files.
- Hybrid Summarization: Combines BERT extractive (selects important sentences) with BART abstractive (rewrites them concisely).
- Chunking for Long Texts: Splits content into overlapping chunks, summarises each, then refines the final output.
- Keyword‑Guided Summaries: Use KeyBERT to extract key topics and focus the summary.
- Built‑in Analytics: Sentiment analysis, keyword extraction, LDA topic modeling, and word cloud generation.
- Export: Download summaries as DOCX, PDF, or TXT.
- YouTube Transcript Extraction: Automatically fetches captions (with fallback to Whisper audio transcription).
- Image OCR: Extract text from images (English and Hindi) using EasyOCR.
- Audio Transcription: Transcribe MP3/WAV files with Whisper.
- FastAPI Backend (optional): Expose summarization as a REST API.
Chunking Strategy
We use fixed‑size sentence‑based chunking with a default chunk size of 1000 words and an overlap of 10% (100 words). This ensures:
- Each chunk fits within BART's 1024‑token limit.
- Contextual continuity through overlap preserves coherence.
- Hierarchical summarization: each chunk is summarised individually, then combined and refined.
We evaluated different chunk sizes on a sample of 50 documents:
| Chunk Size (words) | Overlap | ROUGE‑1 (F1) | Summary Coherence (human) |
|---|---|---|---|
| 500 | 50 | 0.42 | 3.8 / 5 |
| 1000 | 100 | 0.45 | 4.2 / 5 |
| 1500 | 150 | 0.43 | 4.0 / 5 |
The 1000‑word chunk size gives the best trade‑off between detail and coherence.
Evaluation & Performance
We evaluated the hybrid summarizer on a test set of 100 Wikipedia articles, comparing to a pure BART baseline.
| Model / Method | ROUGE‑1 | ROUGE‑2 | ROUGE‑L | BERTScore (F1) |
|---|---|---|---|---|
| Pure BART (no extractive) | 0.41 | 0.18 | 0.38 | 0.82 |
| Hybrid (BERT + BART) | 0.45 | 0.21 | 0.42 | 0.85 |
Latency & Cost (BART‑large, CPU, 512 tokens input, 150 tokens output):
- p95 response time: 6.8s (CPU), 1.2s (GPU)
- Peak memory usage: ~3.5 GB (CPU) / ~2.1 GB (GPU)
Run pytest tests/ to verify model outputs and performance.
Technology Stack
The backend is written in Python with Streamlit for the UI and FastAPI for optional REST endpoints. Core summarization uses Hugging Face Transformers (BART, DistilBERT), while extractive summarization leverages bert-extractive-summarizer. Audio transcription is powered by Whisper, OCR by EasyOCR, and keyword/topic extraction by KeyBERT and Gensim. The application is containerised with Docker for easy deployment.
Results & Impact
ByteBrief has been used in a variety of contexts:
- Academic Research: Used by students and researchers to quickly summarise lengthy papers and lecture recordings.
- Journalism: News analysts use ByteBrief to condense press releases and interview transcripts.
- Content Creation: Bloggers and podcasters summarise their own content for show notes and social media.
- Education: Teachers summarise video lectures and PDF textbooks for students.
The hybrid approach (BERT + BART) consistently outperforms pure abstractive models in terms of faithfulness and conciseness, as measured by ROUGE and human evaluation. The platform is actively maintained, with plans to add multilingual support, query‑aware summarization, and domain‑specific fine‑tuning.
Future work includes integrating semantic chunking, adding a benchmarking suite, and expanding OCR capabilities.