TruthLens is an AI-powered web application that evaluates the credibility of news articles using a hybrid Machine Learning and Deep Learning pipeline. The system combines a fine-tuned DistilBERT model with a Logistic Regression + TF-IDF classifier to generate a credibility score (0–100). It also integrates the Google Fact Check API to provide additional verification, helping users assess the reliability of online news content.
- 📰 AI-powered news credibility analysis
- 🤖 Fine-tuned DistilBERT for contextual understanding
- 📊 Logistic Regression + TF-IDF based classification
- 🌐 Google Fact Check API integration
- 📈 Credibility score ranging from 0–100
- 👤 User authentication system
- 🔐 Secure OTP-based password reset
- 📩 Contact Us form with database storage
- 📱 Responsive and user-friendly interface
- HTML
- CSS
- JavaScript
- Flask
- SQLAlchemy
- Flask-Login
- Flask-Mail
- Fine-tuned DistilBERT
- Logistic Regression
- TF-IDF Vectorizer
- spaCy
- NumPy
- Pandas
- Scikit-learn
- Transformers
- PyTorch
- SQLite
The complete Google Colab notebook used for training and fine-tuning the DistilBERT model is available here:
Google Colab: https://colab.research.google.com/drive/1a-TEW8PKknDpJ_ufnkmaxqSHCOFASj74?usp=sharing
Download the fine-tuned DistilBERT model from the link below:
Model: https://drive.google.com/file/d/1-NgDal2jM3q-9vJWl86AZwZnmNcrdY-H/view?usp=sharing
git clone https://github.com/Anisha32414/TruthLens.git
cd TruthLensWindows
python -m venv .venv
.\.venv\Scripts\activatemacOS/Linux
python3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txt
python -m spacy download en_core_web_smCreate a .env file in the project root and add the required environment variables:
SECRET_KEY=
DATABASE_URL=
EMAIL=
APP_PASSWORD=
FACT_CHECK_API_KEY=
ADMIN_EMAIL=
python app.pyOpen your browser and visit:
http://127.0.0.1:5000
⭐ If you found this project useful, consider giving this repository a Star. Your support is greatly appreciated!