An AI-powered abstractive text summarization web application built using the T5 Transformer model. The application generates concise and meaningful summaries from long-form text through a FastAPI backend and a simple HTML frontend.
- Generate abstractive summaries using Google's T5 Transformer
- FastAPI backend for efficient inference
- Clean and responsive HTML interface
- Automatic text preprocessing
- Supports long-form text summarization
- Uses GPU (CUDA/MPS) when available for faster inference
- Python
- HTML
- FastAPI
- Hugging Face Transformers
- PyTorch
- Pydantic
- T5 (Text-To-Text Transfer Transformer)
AI-Text-Summarizer/
│
├── app.py # FastAPI backend
├── index.html # Frontend UI
├── requirements.txt
├── README.md
├── .gitignore
├── .gitattributes
│
└── saved_summary_model/
├── config.json
├── generation_config.json
├── model.safetensors
├── tokenizer.json
└── tokenizer_config.json
git clone https://github.com/yourusername/ai-text-summarizer.git
cd ai-text-summarizerpython -m venv venvActivate it:
Windows
venv\Scripts\activatemacOS/Linux
source venv/bin/activatepip install -r requirements.txtuvicorn app:app --reloadOpen your browser and visit
http://127.0.0.1:8000
POST
/summarize/
{
"dialogue": "Enter your long text here..."
}{
"summary": "Generated summary..."
}- Transformer: T5
- Framework: Hugging Face Transformers
- Backend: PyTorch
- Inference Device:
- Apple Silicon (MPS)
- CUDA GPU
- CPU
Input Text
│
▼
Text Preprocessing
│
▼
Tokenization
│
▼
T5 Transformer
│
▼
Generated Summary
│
▼
Display Output
- Upload PDF/DOCX files
- Multi-language summarization
- Adjustable summary length
- Deploy using Hugging Face Spaces or Render
- User authentication
- Batch summarization
