CoolFace
Apppublic

RawadAlghamdi/text-summarizer-slider

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
App README

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:

  1. 1.Install dependencies:
bash
    pip install gradio transformers torch
  1. 1.Run the application:
bash
    python app.py
  1. 1.Open the provided local URL in your browser.

How It Works

  1. 1.Enter text into the input box.
  2. 2.Adjust the minimum and maximum summary length using the sliders.
  3. 3.Click submit to generate a summary.
  4. 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 for details.