python -m venv venv source venv/bin/activate
python -m venv venv venv\Scripts\activate
(ensure using correct interpreter)
install depedencies inside venv
pip install --upgrade pip
pip install -r requirements.txtinstall NLTK stock words & tokenizers from script
python NLTKscript.pyMay need to install lxml html clean
pip install lxml[html_clean]or explicitly
pip install lxml_html_cleanafter installing run streamlit app
streamlit run app.pyFake news articles can be found here: https://www.bbc.com/news/topics/cjxv13v27dyt
Example 1: https://www.bbc.com/news/articles/cy890gpqw1po
Example 2 real news: https://www.cnn.com/2025/01/26/politics/colombia-tariffs-trump-deportation-flights/index.html
FakeNewsDetector/
│
├── app.py # Streamlit app (main interface)
├── train.py # Script to train the model
├── evaluate.py # Evaluate the trained model
├── model.py # Model architecture or pipeline definition
├── utils.py # Helper functions (e.g., preprocessing, loading data)
├── requirements.txt # Dependencies (streamlit, pandas, transformers, etc.)
├── data/ # Data directory
│ ├── Fake.csv
│ └── True.csv
└── models/ # Directory to save trained models
└── fake_news_model.pkl
dataset
https://www.kaggle.com/datasets/emineyetm/fake-news-detection-datasets