Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -4,34 +4,127 @@ emoji: πβ‘οΈβοΈ
|
|
4 |
colorFrom: green
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: afl-3.0
|
11 |
---
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
- **User-Friendly Interface**: Built using Gradio for an easy-to-use web interface.
|
21 |
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
- **Framework**: Hugging Face Transformers
|
26 |
|
27 |
-
|
|
|
|
|
28 |
|
29 |
-
|
30 |
-
- **Transformers**: Used for model inference.
|
31 |
-
- **Spaces**: Utilized for GPU acceleration during model execution.
|
32 |
|
33 |
-
|
34 |
|
35 |
-
|
36 |
-
2. Click "Submit" to generate a summary.
|
37 |
-
3. The summarized text will be displayed in the output box.
|
|
|
4 |
colorFrom: green
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.31.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: afl-3.0
|
11 |
---
|
12 |
|
13 |
+
---
|
14 |
+
title: Text Summarizer
|
15 |
+
emoji: πβ‘οΈβοΈ
|
16 |
+
colorFrom: green
|
17 |
+
colorTo: purple
|
18 |
+
sdk: gradio
|
19 |
+
sdk_version: 5.31.0
|
20 |
+
app_file: app.py
|
21 |
+
pinned: false
|
22 |
+
license: afl-3.0
|
23 |
+
---
|
24 |
+
|
25 |
+
# Text Summarization App πβοΈ
|
26 |
+
|
27 |
+
A web-based text summarization tool that uses state-of-the-art NLP models to generate concise summaries from long-form text. Built with Gradio and deployed on Hugging Face Spaces.
|
28 |
+
|
29 |
+

|
30 |
+
|
31 |
+
## π Live Demo
|
32 |
+
|
33 |
+
Try the app: [text-summarization](https://huggingface.co/spaces/ashish-soni08/Text-Summarizer)
|
34 |
+
|
35 |
+
## β¨ Features
|
36 |
+
|
37 |
+
- **Instant Summarization**: Generate concise summaries from lengthy text in seconds
|
38 |
+
- **Clean Interface**: Intuitive web UI built with Gradio
|
39 |
+
- **Pre-trained Model**: Uses DistilBART-CNN for high-quality summarization
|
40 |
+
- **Responsive Design**: Works on desktop and mobile devices
|
41 |
+
|
42 |
+
## π οΈ Technology Stack
|
43 |
+
|
44 |
+
- **Backend**: Python, Hugging Face Transformers
|
45 |
+
- **Frontend**: Gradio
|
46 |
+
- **Model**: [DistilBART-CNN-12-6](https://huggingface.co/sshleifer/distilbart-cnn-12-6)
|
47 |
+
- **Deployment**: Hugging Face Spaces
|
48 |
+
|
49 |
+
## πββοΈ Quick Start
|
50 |
+
|
51 |
+
### Prerequisites
|
52 |
+
|
53 |
+
```bash
|
54 |
+
Python 3.8+
|
55 |
+
pip
|
56 |
+
```
|
57 |
+
|
58 |
+
### Installation
|
59 |
+
|
60 |
+
1. Clone the repository:
|
61 |
+
```bash
|
62 |
+
git clone https://github.com/Ashish-Soni08/text-summarization-app.git
|
63 |
+
cd text-summarization-app
|
64 |
+
```
|
65 |
+
|
66 |
+
2. Install dependencies:
|
67 |
+
```bash
|
68 |
+
pip install -r requirements.txt
|
69 |
+
```
|
70 |
+
|
71 |
+
3. Run the application:
|
72 |
+
```bash
|
73 |
+
python app.py
|
74 |
+
```
|
75 |
+
|
76 |
+
4. Open your browser and navigate to `http://localhost:7860`
|
77 |
+
|
78 |
+
## π Usage
|
79 |
+
|
80 |
+
1. **Input Text**: Paste or type the text you want to summarize in the input box
|
81 |
+
2. **Generate Summary**: Click the "Submit" button
|
82 |
+
3. **View Results**: The summarized text will appear in the output section
|
83 |
+
|
84 |
+
### Example
|
85 |
+
|
86 |
+
**Input:**
|
87 |
+
```
|
88 |
+
Artificial Intelligence has been transforming industries across the globe...
|
89 |
+
[Your example text here]
|
90 |
+
```
|
91 |
+
|
92 |
+
**Output:**
|
93 |
+
```
|
94 |
+
AI is rapidly growing and transforming healthcare, finance, and transportation through machine learning advances.
|
95 |
+
```
|
96 |
+
|
97 |
+
## π§ Model Information
|
98 |
+
|
99 |
+
This app uses DistilBART-CNN-12-6 (sshleifer/distilbart-cnn-12-6), a distilled version of Facebook's BART model:
|
100 |
+
|
101 |
+
- Architecture: 12-layer encoder, 6-layer decoder transformer
|
102 |
+
- Parameters: ~306 million parameters
|
103 |
+
- Training Data: CNN/Daily Mail dataset
|
104 |
+
- Performance: Rouge-2: 21.26, Rouge-L: 30.59
|
105 |
+
- Speed: ~1.24x faster than full BART-large while maintaining competitive quality
|
106 |
|
107 |
+
## π Project Structure
|
108 |
|
109 |
+
```
|
110 |
+
text-summarization-app/
|
111 |
+
βββ app.py # Main Gradio application
|
112 |
+
βββ requirements.txt # Python dependencies
|
113 |
+
βββ README.md # Project documentation
|
114 |
+
```
|
115 |
|
116 |
+
## π License
|
|
|
117 |
|
118 |
+
This project is licensed under the AFL-3.0 License - see the [LICENSE](LICENSE) file for details.
|
119 |
|
120 |
+
## π Acknowledgments
|
|
|
121 |
|
122 |
+
- [Hugging Face](https://huggingface.co/) for the Transformers library and model hosting
|
123 |
+
- [Gradio](https://gradio.app/) for the web interface framework
|
124 |
+
- Original BART paper authors for the foundational research
|
125 |
|
126 |
+
## π Contact
|
|
|
|
|
127 |
|
128 |
+
Ashish Soni - [email protected]
|
129 |
|
130 |
+
Project Link: [text-summarization](https://github.com/Ashish-Soni08/text-summarization-app)
|
|
|
|