Skip to content

Repository files navigation

📝 Text Summarizer

An NLP-powered application that automatically generates concise and meaningful summaries from long text documents using state-of-the-art Natural Language Processing techniques.

This project demonstrates how transformer-based language models can be integrated into a simple, user-friendly application for document summarization.


📌 Features

  • Generate summaries from long text
  • Fast and accurate text compression
  • Supports multiple paragraph inputs
  • Clean and responsive user interface
  • Easy-to-use API (if applicable)
  • Built using modern NLP techniques

🚀 Demo

Add screenshots or a demo GIF here.

Example:

Input

Artificial Intelligence has transformed many industries...

Output

Artificial Intelligence is transforming industries by improving automation,
decision-making, and efficiency.

🛠️ Tech Stack

Programming Language

  • Python

Machine Learning

  • Hugging Face Transformers
  • PyTorch
  • TensorFlow (if used)

NLP

  • BART
  • T5
  • Pegasus
  • Tokenizers

Backend

  • Flask / FastAPI (if applicable)

Frontend

  • HTML
  • CSS
  • JavaScript
  • Bootstrap (if used)

📂 Project Structure

text_summarize/
│
├── app.py
├── model/
├── static/
├── templates/
├── utils/
├── requirements.txt
├── README.md
└── ...

(Update this tree to match your repository.)


⚙️ Installation

Clone the repository

git clone https://github.com/D-engahmed/text_summarize.git

Move into the project

cd text_summarize

Create a virtual environment

Windows

python -m venv venv

venv\Scripts\activate

Linux / macOS

python3 -m venv venv

source venv/bin/activate

Install dependencies

pip install -r requirements.txt

▶️ Running the Project

If using Flask

python app.py

If using FastAPI

uvicorn app:app --reload

Open your browser

http://127.0.0.1:5000

or

http://127.0.0.1:8000

🧠 Model

The summarization model is based on Transformer architecture trained for abstractive summarization.

Possible supported models include:

  • facebook/bart-large-cnn
  • google/pegasus-xsum
  • t5-base
  • t5-small

📊 Workflow

Input Text
      │
      ▼
Preprocessing
      │
      ▼
Tokenization
      │
      ▼
Transformer Model
      │
      ▼
Generated Summary
      │
      ▼
Display Result

📈 Future Improvements

  • PDF summarization
  • DOCX support
  • Multi-language summarization
  • Batch summarization
  • Upload documents
  • API endpoint
  • Docker deployment
  • Model selection
  • Export summary as PDF

📷 Screenshots

Home Page

Add screenshot here

Generated Summary

Add screenshot here


📦 Requirements

Example

Python 3.10+

transformers
torch
flask
sentencepiece
accelerate
numpy

Install

pip install -r requirements.txt

🤝 Contributing

Contributions are welcome.

  1. Fork the repository

  2. Create a feature branch

git checkout -b feature/new-feature
  1. Commit your changes
git commit -m "Add new feature"
  1. Push
git push origin feature/new-feature
  1. Open a Pull Request

📄 License

This project is licensed under the MIT License.


👨‍💻 Author

Ahmed Abdallah Elkossairy


⭐ Support

If you found this project useful, consider giving it a ⭐ on GitHub.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages