In this job, I collaborated with Ihebeddine RYAHI
In this project, we built an end to end fake news classifier. This starts from training a machine learning classifier to deploying a web app.😀
How to do 🤔?
First of all, let's have a look how the app looks like 🤓:
As you see, this web app allows a user to detect either an article is fake or real news. To do, the user just pastes the article in the text area and clicks on Predict
.
NB : You can add some articles in the test dataset file : server/data/fake_or_real_news_testset.csv
To build this app, we followed this main steps:
      • Training a machine learning classifier (Logistic Regression)
      • Building an interactive web app using React.js
      • Setting a REST API
using Flask
      • Node.js (version 12.13.0)
      • Python (version 3.7.4)
      • Flask : pip install flask
      • Go to server\
directory and run app.py
script in order to start the API
      • You can get the pickle of our trained model from Dropbox: https://www.dropbox.com/s/r2bhfdvzb7rb99k/model.pkl?dl=0
and store it in server\model
directory
NB : Keep in mind that when you first run the app.py
script, the machine learning model (~350MB) will be loaded into your machine RAM
      • Go to client\
directory and run npm install && npm start to start the App