How sajid097141/fake-news-detection-capstone works
VERITAS is an educational news-text pattern classifier, not a fact-checker. Its primary runtime path is browser input, Flask validation, prediction through a saved scikit-learn pipeline, and display of a label with probability estimates. The repository also contains a separate WELFake data-preparation and model-development workflow, including comparison and evaluation tools. Edges reflect calls or file use shown in excerpts and documented behavior; unsampled template and styling connections are limited to what the README establishes.
Main entry points: app.py Flask API · index.html News interface · app.js Form and results · clean_data.py Text cleaning
Components 17
Web application
- News interface
webapp/templates/index.html - Form and results
webapp/static/js/app.js - Interface styling
webapp/static/css/style.css - Flask API
webapp/app.py
Prediction pipeline
- Prediction adapter
webapp/predictor.py - Saved TF-IDF model
Dataset preparation
- WELFake data
- Dataset audit
audit_data.py - Dataset inspection
inspect_data.py - Text cleaning
clean_data.py - Cleaned dataset
Model development
- Pipeline training
train_model.py - Model comparison
compare_models.py - Model evaluation
evaluate_model.py - Saved model inspection
inspect_saved_model.py - Performance visuals
model_visuals.py
Other components
- Article submitter
Connections 17
- Article submitter → News interface: enters article
README.md - News interface → Form and results: handles form
README.md - Form and results → Flask API: POSTs prediction
webapp/static/js/app.js - Flask API → News interface: serves interface
README.md - Flask API → Prediction adapter: calls prediction
webapp/app.py - Prediction adapter → Saved TF-IDF model: loads and predicts
webapp/predictor.py - Flask API → Form and results: returns result
README.md - Dataset audit → WELFake data: reads dataset
audit_data.py - Dataset inspection → WELFake data: reads dataset
inspect_data.py - Text cleaning → WELFake data: reads dataset
clean_data.py - Text cleaning → Cleaned dataset: writes cleaned data
clean_data.py - Pipeline training → Cleaned dataset: reads training data
train_model.py - Pipeline training → Saved TF-IDF model: saves trained model
train_model.py - Model comparison → Cleaned dataset: reads training data
compare_models.py - Model evaluation → Cleaned dataset: reads evaluation data
evaluate_model.py - Model evaluation → Saved TF-IDF model: loads model
evaluate_model.py - Saved model inspection → Saved TF-IDF model: loads model
inspect_saved_model.py