Paste any text. Get a crisp 2β3 line summary. Instantly.
Built with T5-Small, HuggingFace Transformers, and Streamlit β deployed on the cloud.
βββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β β¦ Powered by T5 Β· Transformers β
β β
β AI Text β
β Summarizer β
β ββββββ β
β β
β [ Paste your text here... ] β
β 0 chars β
β β
β β‘ Generate Summary β
β β
β β¦ SUMMARY β
β Your intelligent summary appears here... β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββ
| Feature | Description |
|---|---|
| π€ AI Summarization | Uses Google's T5-Small model for intelligent text summarization |
| β‘ Instant Results | Generates summaries in seconds on CPU |
| π¨ Modern Dark UI | Custom dark theme with gradient accents and smooth animations |
| π Live Char Counter | Real-time character count as you type |
| π Model Caching | @st.cache_resource ensures model loads only once |
| βοΈ Cloud Deployed | Live on Streamlit Cloud β no setup needed |
| π± Responsive | Works on desktop and mobile browsers |
| Layer | Technology |
|---|---|
| Frontend | Streamlit + Custom CSS |
| ML Model | T5-Small (HuggingFace) |
| Framework | HuggingFace Transformers |
| Deep Learning | PyTorch (CPU mode) |
| Hosting | Streamlit Cloud |
| Language | Python 3.14 |
Make sure you have Python installed:
python --version # 3.9+ recommended1. Clone the repository
git clone https://github.com/asad-aziz-001/ai-text-summarizer.git
cd ai-text-summarizer2. Install dependencies
pip install -r requirements.txt3. Run the app
streamlit run app.py4. Open in browser
http://localhost:8501
streamlit
transformers>=4.45.0,<5.0.0
torch>=2.9.0
sentencepieceai-text-summarizer/
β
βββ app.py # Main Streamlit application
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
User Input Text
β
βΌ
βββββββββββββββ
β Streamlit β β Web Interface
β UI β
ββββββββ¬βββββββ
β
βΌ
βββββββββββββββ
β T5-Small β β HuggingFace Pipeline
β Model β (Cached on first load)
ββββββββ¬βββββββ
β
βΌ
Summary Output
(2β3 sentences)
- User pastes text into the input area
- Clicks β‘ Generate Summary
- Text is passed to the
summarizationpipeline - T5-Small model processes and compresses the text
- Clean summary is displayed in the result card
- Color Palette β Deep navy (
#0a0a0f) with neon green (#7fffb2) and cyan (#3af0ff) accents - Typography β
Synefor headings,DM Sansfor body text - Gradient Title β White β Green β Cyan animated gradient
- Glow Effects β Subtle radial gradients on background
- Animated Button β Hover lift with shadow bloom
- Result Card β Gradient top border with glassmorphism background
You can tweak summarization behavior in app.py:
summary = summarizer(
input_text,
max_length=60, # Maximum summary length (tokens)
min_length=20, # Minimum summary length (tokens)
do_sample=False # Deterministic output
)| Parameter | Default | Description |
|---|---|---|
max_length |
60 |
Max tokens in summary |
min_length |
20 |
Min tokens in summary |
do_sample |
False |
Greedy decoding (consistent results) |
device |
-1 |
-1 = CPU, 0 = GPU |
Try these sample texts to test the app:
π€ Technology
Artificial intelligence is rapidly transforming industries across the globe. From healthcare to finance, AI-powered systems are automating complex tasks, improving accuracy, and reducing costs. Machine learning algorithms can now detect diseases from medical images with higher accuracy than human doctors. In finance, AI is used for fraud detection, algorithmic trading, and personalized banking. However, concerns about job displacement, data privacy, and algorithmic bias continue to grow as AI becomes more integrated into daily life.
π Climate Change
Climate change is one of the most pressing challenges facing humanity today. Rising global temperatures caused by greenhouse gas emissions are leading to more frequent and intense natural disasters, including hurricanes, floods, and wildfires. Sea levels are rising, threatening coastal cities around the world. Scientists warn that without immediate and drastic action to reduce carbon emissions, the consequences could be irreversible.
π΅π° Pakistan Tech
Pakistan is one of the world's fastest-growing digital economies. With over 100 million internet users and a young population, the country has seen a boom in e-commerce, fintech, and freelancing. Pakistani freelancers rank among the top earners globally on platforms like Upwork and Fiverr. The government has launched several digital initiatives to improve connectivity in rural areas and promote tech startups.
Contributions are welcome! Feel free to:
- π Report bugs via Issues
- π‘ Suggest features
- π§ Submit pull requests
This project is licensed under the MIT License β feel free to use, modify, and distribute.