Uses Python ML to detect biased news.
The data to train this program is provided in the file news.csv.
- Numpy
- Pandas
- Sklearn
- Streamlit
py -m pip install --user virtualenv
py -m venv env
Authorize access
Set-ExecutionPolicy Unrestricted -Scope Process
.\env\Scripts\activate.ps1
py -m pip install [library-name]
Run the command below.
py -m unittest -v fake-news.py
Run the command below.
py -m streamlit run gui.py
The UI should be on http://localhost:8501/
-
fake-news.py
This file contains the model to detect biased news.
When prompted, enter the headline in text form in the terminal to get either "UNBIASED" or "BIASED". -
cm.py
This file contains the Confusion Matrix showing the validity of the model. -
gui.py
This file contains the code for GUI showing the model.