How harshithreddy973/misinfo-detector works
Misinformation Detector is a human-review decision-support application. Users submit one article or a CSV through the Streamlit interface; the API runs shared inference, returns prediction, confidence, priority, and available explanations, and stores results for reviewer follow-up. Batch results can be exported, while reviewers can confirm, dismiss, or relabel without overwriting the original prediction. The repository also includes dataset preparation stages. The README documents the major runtime capabilities; unsampled implementation details are represented only where that documentation supports them.
Main entry points: main.py FastAPI endpoints · merge_all.py Dataset merger · inference.py Inference and explanations · schema.py Unified data schema
Components 16
User interface
- Streamlit UI
app/app.py
Prediction service
- FastAPI endpoints
api/main.py - API contracts
api/schemas.py - Feature generation
model/inference.py - Inference and explanations
model/inference.py - Calibrated model
models/calibrated_model.joblib - SHAP background data
data/processed/train_features.parquet
Review and storage
- Persistence operations
api/db.py - SQLite records
api/db.py
Dataset preparation
- FakeNewsNet cleaner
data/clean_fakenewsnet_main.py - ISOT cleaner
data/clean_isot.py - LIAR cleaner
data/clean_liar.py - Unified data schema
data/schema.py - Dataset merger
data/merge_all.py - Dataset splitting
data/split_dataset.py
Other components
- User / reviewer
Connections 18
- User / reviewer → Streamlit UI: submits articles
README.md - Streamlit UI → FastAPI endpoints: sends HTTP requests
README.md - FastAPI endpoints → Inference and explanations: runs predictions
README.md - FastAPI endpoints → Persistence operations: stores and retrieves
api/main.py - FastAPI endpoints → API contracts: uses request models
api/main.py - Inference and explanations → Feature generation: generates features
README.md - Inference and explanations → Calibrated model: predicts probabilities
README.md - Inference and explanations → SHAP background data: uses background data
README.md - Persistence operations → SQLite records: persists records
api/db.py - FastAPI endpoints → Streamlit UI: returns results
README.md - FakeNewsNet cleaner → Unified data schema: validates against
data/clean_fakenewsnet_main.py - ISOT cleaner → Unified data schema: validates against
data/clean_isot.py - LIAR cleaner → Unified data schema: validates against
data/clean_liar.py - Dataset merger → Unified data schema: validates against
data/merge_all.py - Dataset merger → FakeNewsNet cleaner: reads cleaned output
data/merge_all.py - Dataset merger → ISOT cleaner: reads cleaned output
data/merge_all.py - Dataset merger → LIAR cleaner: reads cleaned output
data/merge_all.py - Dataset splitting → Dataset merger: reads combined corpus
data/split_dataset.py