An AI-powered web application that detects whether a news article is REAL or FAKE, designed for Nepali and English content.
π Live Demo
πΒ https://demo.purwanews.com/
π Features
- Fake / Real prediction
- Confidence score
- Nepali + English support
- Modern UI
- Real-time API
π§ How it works
User Input β API β ML Model β Prediction
- TF-IDF Vectorizer
- Logistic Regression
- Returns prediction + confidence
π Dataset Used
The dataset used in this project is sourced from Kaggle:
π https://www.kaggle.com/ashoknepal/datasets
π§ Dataset Description
- Collection of Nepali news articles
- Includes labeled data for fake and real news
- Contains fields such as:
news_contextΒ (news content)labelΒ (0 = fake, 1 = real)
βοΈ Data Processing
To prepare the dataset for training:
- Multiple dataset files were combined
- Only required columns were used:
news_contextlabel
- Removed:
- null values
- empty text
- duplicate entries
- Data was shuffled for better training
π Final Dataset Format
| news_context | label |
|---|---|
| News text... | 0 |
| News text... | 1 |
β οΈ Note
- Dataset quality directly affects model performance
- Results may vary on real-world news inputs
π Tech Stack
- Python (Flask)
- Scikit-learn
- HTML, CSS, JavaScript
- cPanel Deployment
π Project Structure
fake-news-api/ β βββ api.py βββ passenger_wsgi.py βββ train_model.py βββ model.pkl βββ vectorizer.pkl
π Model Accuracy
- Accuracy: ~96%
- Balanced performance on real and fake news
Screenshot
β οΈ Disclaimer
This system provides AI-based predictions and may not always be 100% accurate.
π¨βπ» Author
Santosh Poudel
