Fake News Detection Web Application
Developed a bilingual Fake News Detection application using NLP, TF-IDF and Logistic Regression to classify news as REAL or FAKE, with a Flask API and live web deployment.
1. Project Overview
Developed a bilingual Fake News Detection application using NLP, TF-IDF and Logistic Regression to classify news as REAL or FAKE, with a Flask API and live web deployment.
Key Highlight
Implemented and deployed an end-to-end fake news detection application using NLP, TF-IDF feature extraction, and Logistic Regression, with support for English and Nepali user interfaces.
2. Problem / Challenge
he rapid growth of digital media and online news platforms has made it increasingly difficult for readers to distinguish reliable information from potentially misleading content. Manually checking every news article can be time-consuming, creating an opportunity to explore automated text classification techniques.
The main technical challenges were:
Processing user-submitted news text for machine learning classification.
Converting textual content into numerical features suitable for model prediction.
Integrating the trained machine learning model into a functional web application.
Developing an API to connect the frontend with the prediction model.
Presenting prediction results and confidence scores in a simple, understandable interface.
Supporting both English and Nepali language interfaces.
3. Approach / Methodology
The project followed a machine learning development and web deployment workflow:
Text Processing: Prepared news text for machine learning classification.
Feature Extraction: Used TF-IDF vectorization to transform textual content into numerical features.
Model Integration: Integrated a trained Logistic Regression classifier with the corresponding TF-IDF vectorizer.
Backend Development: Developed a Flask API with an endpoint to receive news text and return classification results.
Frontend Development: Implemented a responsive interface with English and Nepali language options.
Model Prediction: Processed user-submitted text and returned REAL or FAKE predictions with confidence scores.
Deployment: Deployed the Flask application using Python 3.9 and cPanel Passenger, making the application accessible through a dedicated subdomain.
Testing: Tested the prediction endpoint and verified successful communication between the frontend and backend.
4. My Contribution
I worked on the development and deployment of the application, including machine learning integration and web application implementation.
My contributions included:
Integrating the Logistic Regression model and TF-IDF vectorizer using Python.
Implementing the Flask backend and prediction API.
Connecting the frontend interface with the machine learning prediction endpoint.
Implementing English and Nepali interface options.
Displaying classification results and confidence scores.
Configuring the Python environment and required machine learning dependencies.
Deploying the application through cPanel and configuring the application using Passenger.
Testing the deployed application to verify that predictions were returned successfully.
5. Results / Outcome
Successfully developed and deployed a functional Fake News Detection web application.
Users can submit news text through the web interface.
The backend processes submitted text using the integrated TF-IDF vectorizer and Logistic Regression model.
The application returns REAL or FAKE classifications with confidence scores.
The application supports English and Nepali interface options.
Successfully deployed and tested the frontend-to-backend prediction workflow on a dedicated domain.
The deployed application demonstrates the practical integration of machine learning, NLP, Python backend development, and web technologies.
6. What I Learned
This project strengthened my understanding of applying machine learning techniques to real-world text classification problems.
Key learnings included:
Practical application of NLP and TF-IDF feature extraction.
Integrating trained machine learning models into web applications.
Building REST-style prediction APIs using Flask.
Managing Python environments and machine learning dependencies.
Deploying Python applications using cPanel and Passenger.
Connecting frontend interfaces with backend machine learning services.
Understanding the importance of testing model integration and deployment workflows.