Skip to content

PRERITARYA/smart-news-summarizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

55 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


"Stop drowning in news. Start understanding it."

An intelligent full-stack web application that summarizes news articles using state-of-the-art NLP, analyzes their sentiment, reads them aloud, and tracks breaking stories over time β€” all behind a secure, personalized login.


πŸš€ Live Demo Β Β·Β  πŸ› Report Bug Β Β·Β  ✨ Request Feature


πŸ“Έ Screenshots

πŸ” Login Page πŸ“ Summarizer πŸ“ˆ News Pulse

πŸ’‘ Replace the placeholder images above with actual screenshots from your app.


🌟 Why Smart News Summarizer?

The average person encounters hundreds of news articles daily. Reading them all is impossible. Smart News Summarizer solves this by giving you the essence of any article in seconds β€” with AI that actually understands what it's reading.

Built during a real-world internship at Sopra Steria, Noida, this is not a toy project. It's a production-ready, full-stack application with secure authentication, real NLP models, live news APIs, and text-to-speech β€” deployed on Streamlit Cloud.


✨ Features

🧠 AI-Powered Summarization

  • Paste a URL or raw article text and get an intelligent summary instantly
  • Powered by distilbart-cnn-12-6 from Hugging Face Transformers β€” a state-of-the-art extractive/abstractive NLP model
  • Choose from 3 summary lengths: One Line Β· Short Paragraph Β· Detailed

πŸ“Š Sentiment & Insight Analysis

  • Polarity score (Positive / Neutral / Negative) via TextBlob
  • Subjectivity score (Objective / Mixed / Subjective)
  • Word count and estimated reading time for every article

🌐 Multilingual Output

  • Translate summaries to Hindi using Google Translate API (Deep Translator)
  • More languages can be easily added

πŸ”Š Text-to-Speech (Listen Mode)

  • Hit "Listen to Summary" and hear the summary read aloud via gTTS
  • Works in both English and Hindi

πŸ“ˆ News Pulse β€” Timeline Tracker

  • Enter any topic (e.g. "Climate Change", "ISRO", "Budget 2025")
  • Get a 7-day chronological timeline of top headlines from NewsAPI
  • Expand any headline for its description, timestamp, and source link

πŸ” Secure Firebase Authentication

  • Email + Password signup with mandatory email verification
  • Username-based login backed by Firestore database
  • Forgot Password with reset email flow
  • Animated loading overlay during all auth actions
  • Session-based logout with full state cleanup

πŸ—οΈ Architecture

smart-news-summarizer/
β”‚
β”œβ”€β”€ login.py                  # πŸ” Entry point β€” Firebase Auth (Login / Signup / Reset)
β”‚
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ app.py                # 🧠 Main app β€” Summarizer + News Pulse tabs
β”‚   └── verify.py             # βœ… Email verification handler (Firebase oobCode)
β”‚
β”œβ”€β”€ .streamlit/
β”‚   └── config.toml           # 🎨 Streamlit theme config
β”‚
β”œβ”€β”€ requirements.txt          # πŸ“¦ All dependencies
└── README.md

Data Flow:

User β†’ login.py β†’ Firebase Auth β†’ Email Verification
     β†’ pages/app.py β†’ [URL Input] β†’ Trafilatura/Newspaper3k β†’ Text Extraction
                    β†’ HuggingFace distilBART β†’ Summary
                    β†’ TextBlob β†’ Sentiment Analysis
                    β†’ gTTS β†’ Audio Output
                    β†’ Deep Translator β†’ Hindi Translation
                    β†’ NewsAPI β†’ News Pulse Timeline

πŸ› οΈ Tech Stack

Layer Technology
Frontend & Backend Streamlit 1.47.1
NLP / Summarization HuggingFace Transformers (distilbart-cnn-12-6), PyTorch
Sentiment Analysis TextBlob, NLTK
Text Extraction Trafilatura, Newspaper3k, BeautifulSoup4
Translation Deep Translator (Google Translate)
Text-to-Speech gTTS (Google Text-to-Speech)
Authentication Firebase Auth (Pyrebase4) + Firebase Admin SDK
Database Firestore (Firebase)
News Data NewsAPI (/v2/everything)
Environment Python-dotenv, Streamlit Secrets

βš™οΈ Installation & Setup

1. Clone the repository

git clone https://github.com/PRERITARYA/smart-news-summarizer.git
cd smart-news-summarizer

2. Install dependencies

pip install -r requirements.txt

3. Configure secrets

Create a .streamlit/secrets.toml file with the following:

NEWS_API_KEY = "your_newsapi_key_here"

[FIREBASE_CONFIG]
apiKey = "your_firebase_api_key"
authDomain = "your-project.firebaseapp.com"
databaseURL = "https://your-project.firebaseio.com"
projectId = "your-project-id"
storageBucket = "your-project.appspot.com"
messagingSenderId = "your_sender_id"
appId = "your_app_id"

[FIREBASE]
type = "service_account"
project_id = "your-project-id"
private_key_id = "your_private_key_id"
private_key = "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
client_email = "firebase-adminsdk-...@your-project.iam.gserviceaccount.com"
client_id = "your_client_id"
auth_uri = "https://accounts.google.com/o/oauth2/auth"
token_uri = "https://oauth2.googleapis.com/token"

4. Run the app

streamlit run login.py

Open http://localhost:8501 in your browser.


πŸ”‘ Getting API Keys

Service How to get it
NewsAPI Sign up free at newsapi.org
Firebase Create a project at console.firebase.google.com β†’ Enable Email/Password Auth β†’ Create Firestore DB β†’ Generate Admin SDK key

πŸ“¦ Key Dependencies

streamlit==1.47.1          # UI framework
transformers==4.54.1       # HuggingFace NLP models
torch==2.7.1               # PyTorch backend
textblob==0.17.1           # Sentiment analysis
trafilatura==2.0.0         # Article text extraction
newspaper3k==0.2.8         # Article scraping
deep-translator==1.11.4    # Google Translate API
gTTS==2.5.4                # Text-to-speech
firebase-admin==6.6.0      # Firebase Admin SDK
pyrebase4 @ git+...        # Firebase client SDK
requests==2.32.4           # HTTP requests

πŸš€ Deployment (Streamlit Cloud)

  1. Push your code to GitHub
  2. Go to share.streamlit.io
  3. Connect your repo β€” set main file to login.py
  4. Add all secrets in the Secrets section of the app settings
  5. Deploy πŸŽ‰

🎯 Use Cases

πŸ‘€ Who πŸ’‘ How they use it
Journalists & Researchers Rapidly review dozens of articles to extract key facts
Business Professionals Track competitor news and industry trends via News Pulse
Students Summarize long articles for assignments and research
General Public Stay informed in minutes, not hours

πŸ™ Acknowledgements

This project was built during an internship at Sopra Steria India, Noida (July – September 2025).

Special thanks to Mr. Chandramouli Vashisth (Sr. Technical Lead, Sopra Steria Group) for his continuous guidance, invaluable feedback, and technical mentorship throughout the development of this project.


πŸ‘¨β€πŸ’» Author

Prerit Arya B.Tech Computer Science & Engineering

GitHub


⭐ If you found this project useful, please consider giving it a star!

Built with ❀️ during internship at Sopra Steria · 2025

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages