https://github.com/letsdoitbycode/text-summarization-webapp
This Flask application utilizes the Pegasus Transformer model by Google for conditional text summarization. It allows users to input large text and receive a concise summary, making it ideal for processing articles, reports, or any long-form text data.
https://github.com/letsdoitbycode/text-summarization-webapp
cuda-support flask-application natural-language-processing pegasus-transformer python text-summarization
Last synced: 2 months ago
JSON representation
This Flask application utilizes the Pegasus Transformer model by Google for conditional text summarization. It allows users to input large text and receive a concise summary, making it ideal for processing articles, reports, or any long-form text data.
- Host: GitHub
- URL: https://github.com/letsdoitbycode/text-summarization-webapp
- Owner: letsdoitbycode
- Created: 2024-08-15T06:49:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-02T13:32:23.000Z (over 1 year ago)
- Last Synced: 2025-12-06T16:52:46.232Z (7 months ago)
- Topics: cuda-support, flask-application, natural-language-processing, pegasus-transformer, python, text-summarization
- Language: Python
- Homepage:
- Size: 52.2 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Text Summarization Project with Flask and Pegasus Transformer
This Flask application utilizes the Pegasus Transformer model by Google for conditional text summarization. It allows users to input large text and receive a concise summary, making it ideal for processing articles, reports, or any long-form text data.
### Features
- Text Summarization: Uses the PegasusForConditionalGeneration model to generate a summary for the input text.
- CUDA Optimization: Leverages CUDA if available, allowing for faster summarization on GPU devices.
- Responsive Web Interface: The application provides a user-friendly interface with index.html for input and output.html to display results.
### How It Works
- Input: The user submits text via a form on the home page.
- Text Tokenization: The input text is tokenized and encoded for the Pegasus model.
- Summarization: The model generates a summary with specified minimum and maximum length constraints.
- Output: The summary is decoded and displayed on the output page.
### Requirement
- Python >= 3.10
- Flask
- Transformers
- gunicorn
- sentencepiece
- torch
### Installation
1. Clone the repository
```sh
git clone https://github.com/letsdoitbycode/Text-Summarization-Webapp.git
cd Text-Summarization-Webapp
```
3. Create a virtual environment and activate it:
```sh
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
3. Install the required packages:
```sh
pip install flask transformers torch sentencepiece gunicorn
pip install requirements.txt #else you can do this directly
```
4. Run the Flask app:
```sh
python app.py
```
### Project Structure
```plaintext
Text-Summarization-Webapp/
│
├── templates/
│ └── index.html # HTML file for text input
│ └── output.html # Output file for a output of summarisation
├── venv # Virtual environment
├── README.md # This README file
├── app.py # Main Flask application
└── requirements.txt # requirement file
```
## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.
## DEMP APPLICATION
----

