|
|
--- |
|
|
title: CPU Only TextSummarization |
|
|
emoji: 🏃 |
|
|
colorFrom: indigo |
|
|
colorTo: purple |
|
|
sdk: gradio |
|
|
sdk_version: 5.31.0 |
|
|
app_file: app.py |
|
|
pinned: false |
|
|
license: apache-2.0 |
|
|
short_description: CPU-only Text Summarization |
|
|
--- |
|
|
# 📝 Text Summarization Demo |
|
|
[](https://huggingface.co/spaces/your-username/text-summarizer) |
|
|
[] |
|
|
[](https://huggingface.co/sshleifer/distilbart-cnn-12-6) |
|
|
[](LICENSE) |
|
|
|
|
|
--- |
|
|
|
|
|
## 🚀 Overview |
|
|
Leverage **Transformer-based NLP** to condense long text into a crisp summary. |
|
|
Ideal for articles, reports, or meeting notes—runs entirely on **free CPU**. |
|
|
|
|
|
> **Key AI buzzwords:** |
|
|
> • Distilled BART • Abstractive Summarization • Sequence-to-Sequence • Real-time inference • Edge deployment • Cloud-native demo |
|
|
|
|
|
--- |
|
|
|
|
|
## ✨ Features |
|
|
|
|
|
| 🔑 Feature | 🔍 Description | |
|
|
|--------------------------|------------------------------------------------------------------| |
|
|
| **🧠 Distilled BART** | Uses `sshleifer/distilbart-cnn-12-6` for fast, accurate summaries | |
|
|
| **⚡ CPU-Only Inference** | <500 ms per 500 words on a free-tier Space CPU | |
|
|
| **🎛️ Adjustable Length** | Control summary brevity with max/min token sliders | |
|
|
| **🎨 Clean UI** | Gradio Blocks for seamless text input & output | |
|
|
| **☁️ Instant Deploy** | Push three files—Spaces auto-builds & hosts your demo | |
|
|
|
|
|
--- |
|
|
|
|
|
## 🏗️ Architecture & Workflow |
|
|
|
|
|
1. **User Input** – Paste or type in any long-form text. |
|
|
2. **Summarization Pipeline** – FFN-based encoder-decoder distills the core idea. |
|
|
3. **Parameter Controls** – Adjust `max_length`/`min_length` for conciseness. |
|
|
4. **UI Rendering** – Gradio displays the summary for instant copy/paste. |
|
|
|
|
|
All computation occurs **locally in the Space**, ensuring **privacy** and **zero API costs**. |
|
|
|
|
|
--- |
|
|
|
|
|
## 🛠️ Local Development |
|
|
|
|
|
```bash |
|
|
git clone https://github.com/your-username/text-summarizer.git |
|
|
cd text-summarizer |
|
|
python3 -m venv venv && source venv/bin/activate |
|
|
pip install -r requirements.txt |
|
|
python app.py |
|
|
|
|
|
|