A newer version of the Gradio SDK is available:
5.45.0
metadata
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
Running Locally (Optional)
To run the app on your machine:
- Install dependencies:
pip install gradio transformers torch
- Run the application:
python app.py
- Open the provided local URL in your browser.
How It Works
- Enter text into the input box.
- Adjust the minimum and maximum summary length using the sliders.
- Click submit to generate a summary.
- The summarized text appears in the output box.
Customization
- Modify the range of
min_length_slider
andmax_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 for details.