--- title: Text Summarization emoji: 📝 colorFrom: blue colorTo: indigo sdk: gradio sdk_version: 3.35.2 app_file: app.py pinned: false --- # 📝 Text Summarization with Transformers This Hugging Face Space demonstrates how to perform text summarization using a pre-trained model from the `transformers` library. It provides a simple interface to generate a concise summary from a longer text document. This project is part of a portfolio showcasing foundational AI/ML skills. It highlights the ability to leverage powerful, pre-trained models for common Natural Language Processing (NLP) tasks. ## 🚀 How to Use the Demo 1. **Enter Text:** Paste the long-form text you want to summarize into the "Original Text" input box. 2. **Generate Summary:** Click the **"Summarize"** button. 3. **View Result:** The generated summary will appear in the "Summarized Text" box on the right. ## 🧠 Model Information This demo uses the [`sshleifer/distilbart-cnn-12-6`](https://huggingface.co/sshleifer/distilbart-cnn-12-6) model, a sequence-to-sequence model fine-tuned on the CNN/DailyMail dataset for summarization. It is a distilled version of the BART model, making it faster and more efficient while retaining high performance. ## 🛠️ Technical Details - **Framework:** The interactive demo is built with [Gradio](https://www.gradio.app/). - **Library:** The core summarization logic is powered by the Hugging Face [`transformers`](https://huggingface.co/docs/transformers/index) library. - **Hardware:** The application is configured to leverage a GPU if one is available, which significantly speeds up the summarization process. - **Workflow:** The project follows a standard development workflow, including dependency management (`requirements.txt`), refactoring for testability, and unit testing (`unittest`).