Inspiration
In today’s digital world, misinformation spreads rapidly across social media and news platforms, making it difficult for users to distinguish between real and fake news. We were inspired to build a solution that leverages AI to help people verify information quickly and confidently.
What it does
This project detects whether a news article is real or fake using an AI-powered model. Users can paste any news text, and the system analyzes it to provide a prediction along with a confidence score. It also highlights important keywords that influenced the decision and fetches related real news articles from live sources to help users verify the information.
How we built it
We built a full-stack AI-powered fake news detection system using:
Machine Learning (NLP):
- Used TF-IDF vectorization to convert text into numerical features.
- Trained a classification model (e.g., Logistic Regression) on labeled datasets of real and fake news.
Backend:
- Developed using Flask to create REST APIs.
/predictendpoint for fake/real classification./real-newsendpoint to fetch related articles using NewsAPI.
Frontend:
- Built with React (Vite + Tailwind CSS).
- Users can input news text and get:
- Prediction (Real/Fake)
- Confidence score
- Highlighted keywords
- Related real news articles
Deployment:
- Backend deployed on Render
- Frontend deployed on Vercel
Built With
- Python
- Flask
- Scikit-learn
- Pandas, NumPy
- React (Vite)
- Tailwind CSS
- NewsAPI
- Render
- Vercel
Challenges we ran into
- Model bias: The model initially predicted most inputs as "Fake"
- Connecting frontend and backend (CORS issues)
- Deployment hurdles (missing dependencies, API failures)
- Backend cold starts (Render free tier delays)
- Handling large datasets in GitHub (file size limits)
Accomplishments that we're proud of
We are proud of successfully building and deploying a complete end-to-end AI-powered application that integrates machine learning with a modern web interface. From training the NLP model to connecting it with a Flask backend and a React frontend, and finally deploying it online, this project demonstrates our ability to turn an idea into a real, usable product. We are especially proud of features like confidence scoring, keyword highlighting, and real-time news verification, which make the system more transparent and useful for users.
What we learned
- Integrating machine learning models into real-world web applications
- Handling frontend-backend communication and CORS issues
- Importance of data preprocessing in NLP tasks
- Deployment of full-stack applications
- Managing API integrations and asynchronous workflows
What's next for Fake News Detector
- Add explainable AI to show why news is classified as fake
- Improve accuracy using advanced models like BERT
- Add user authentication and history tracking
- Support multilingual news detection
Built With
- flask
- javascript
- newsapi
- numpy
- pandas
- python
- react
- scikit-learn
- tailwind
Log in or sign up for Devpost to join the conversation.