An API to classify fake/real news by a ML model.
Install python3
and pip
.
Download dataset from here.
-
Set up virtual virtual environment by running the following commands:
python3 -m venv fakeNews
On windows, run:
fakeNews\Scripts\activate.bat
On Unix or MacOS, run:
source fakeNews/bin/activate
-
Install required packages:
pip install -r requirements.txt
-
To build the ML model:
python3 fake_news_detection.py
This would create a serialized version of our model into a file model.pkl
-
To test the API on locally hosted URL http://127.0.0.1:5000/ run:
python3 app.py
Send POST requests at '/predict' to get a JSON response of:
{"result": "fake"} or {"result": "real"}
Link to the chrome extension can be found here You might as well want to check out the extension repo here