|
--- |
|
title: Text Summarizer Slider |
|
emoji: π |
|
colorFrom: red |
|
colorTo: purple |
|
sdk: gradio |
|
sdk_version: 5.17.1 |
|
app_file: app.py |
|
pinned: false |
|
license: apache-2.0 |
|
--- |
|
# Text Summarizer with Adjustable Length |
|
|
|
An interactive text summarization tool using the `facebook/bart-large-cnn` model. Built with Gradio and deployed on Hugging Face Spaces. |
|
|
|
## Features |
|
|
|
- **Summarization**: Generate concise summaries for long text. |
|
- **Adjustable Summary Length**: Use sliders to control minimum and maximum summary length. |
|
- **User-Friendly Interface**: Powered by Gradio. |
|
- **No Installation Required**: Use it directly online. |
|
|
|
## Access the App |
|
|
|
Try it here: |
|
[https://huggingface.co/spaces/RawadAlghamdi/text-summarizer-slider](https://huggingface.co/spaces/RawadAlghamdi/text-summarizer-slider) |
|
|
|
## Running Locally (Optional) |
|
|
|
To run the app on your machine: |
|
|
|
1. Install dependencies: |
|
```bash |
|
pip install gradio transformers torch |
|
``` |
|
2. Run the application: |
|
```bash |
|
python app.py |
|
``` |
|
3. Open the provided local URL in your browser. |
|
|
|
## How It Works |
|
|
|
1. Enter text into the input box. |
|
2. Adjust the **minimum** and **maximum** summary length using the sliders. |
|
3. Click submit to generate a summary. |
|
4. The summarized text appears in the output box. |
|
|
|
## Customization |
|
|
|
- Modify the range of `min_length_slider` and `max_length_slider` to change allowed summary lengths. |
|
- Replace the model name in `pipeline("summarization", model="facebook/bart-large-cnn")` to test other models. |
|
|
|
## License |
|
|
|
Licensed under the **Apache License 2.0**. See [LICENSE](LICENSE) for details. |