This project is a web application that provides text summarization functionality. It allows users to input text and receive a summarized version of the input text. The application is built using Flask for the backend and HTML, CSS, and JavaScript for the frontend. It uses the Hugging Face Transformers library for text summarization.
- Summarizes input text using a pre-trained model from Hugging Face.
- Allows users to specify minimum and maximum lengths for the summary.
- Provides a user-friendly interface with a loading indicator.
- Ensures that the maximum length is greater than the minimum length.
flask
flask-cors
transformers
torch
- Clone the repository:
git clone https://github.com/AhmedNasser1601/Text-Summarizer.git cd Text-Summarizer
- Install the required packages:
pip install -r requirements.txt
- Run the application:
python main.py
- Open your web browser and go to
http://127.0.0.1:5000
.
- Enter the text you want to summarize in the text area.
- Adjust the minimum and maximum lengths using the plus and minus buttons.
- Click the "Summarize" button.
- Wait for the summary to be generated. The summary will be displayed below the form.
main.py
: The backend Flask application that handles requests and performs text summarization.templates/index.html
: The main HTML file that contains the structure of the web page.static/main.css
: The CSS file for styling the web page.static/main.js
: The JavaScript file that handles form submission and interacts with the backend.
- Hugging Face for the Transformers library
- Flask framework