A Flask web app that detects fake news using a TF-IDF + Passive Aggressive Classifier model, backed by PostgreSQL for logging and history.
- Fake news classification via TF-IDF vectorization and a Passive Aggressive Classifier
- PostgreSQL-backed history of past checks
- Simple web UI (submit text, get a result, view history)
- Python, Flask
- scikit-learn, pandas, numpy, joblib
- PostgreSQL (psycopg2)
git clone https://github.com/zulqarnain2004/TruthPulse.git
cd TruthPulse/"dbms project"
pip install -r requirements.txtCreate a PostgreSQL database named actchecker, then copy .env.example to .env and fill in your own credentials:
copy .env.example .envRun the app:
python app.pydbms project/ ├── app.py # Flask routes ├── ai_model.py # TF-IDF + PassiveAggressiveClassifier model ├── database.py # PostgreSQL connection and logging ├── templates/ # HTML views ├── static/ # CSS └── requirements.txt
MIT