How yasha-2006/fake_news_detection works
This is a small Flask fake-news text classifier. A user opens the prediction page, submits a headline, and the app preprocesses it, applies the saved TF-IDF vectorizer and classifier, then displays a “looking real” or “looking fake” label. The repository also includes training and test CSVs, but the README says the web app loads saved artifacts rather than training at startup. The workflow is based on the README and the excerpted app.py; template internals were not sampled.
Main entry points: app.py Flask routes · prediction.html Prediction page · index.html Landing page · tfidf_vectorizer.pkl TF-IDF vectorizer
Components 9
Web interface
- Flask routes
app.py - Landing page
templates/index.html - Prediction page
templates/prediction.html
Prediction workflow
- Text preprocessing
app.py - Label mapping
app.py
Model assets
- TF-IDF vectorizer
tfidf_vectorizer.pkl - Saved classifier
model.pkl - CSV datasets
Dataset/train.csv
Other components
- User
Connections 8
- User → Flask routes: submits headline
README.md - Flask routes → Landing page: renders
app.py - Flask routes → Prediction page: renders
app.py - Flask routes → Text preprocessing: calls
app.py - Text preprocessing → TF-IDF vectorizer: transforms text
app.py - Text preprocessing → Saved classifier: predicts label
app.py - Flask routes → Label mapping: maps prediction
app.py - Flask routes → Prediction page: renders result
app.py