A web application that parses online articles/text and measures bias via a linguistic patterns based machine learning algorithm.
-
First clone the repo
git clone https://github.com/BostonUniversitySeniorDesign/21-22-newsbias.git
-
Then start the virtual environment
cd 21-22-newsbias/react-flask-app/ && pipenv shell
-
Then download the backend dependencies
cd api && pipenv install
-
Then open a new tab in your terminal (rooted at
/react-flask-app
) -
Then download frontend dependencies
npm i
(and thennpm audit fix
if prompted) -
Download
features.ckpt
,data.zip
, andlexicons.zip
-
Create a folder @
/ML/saved_models
and placefeatures.ckpt
in there -
Unzip
data
andlexicons
, placelexicons
indata
and placedata
@/ML/data
-
From the first terminal tab, with the pipenv running, start the flask server
flask run
-
Lastly, from the second tab, start the react server
yarn start
and the webapp should open in your browser
All code related to the bias detection machine learning algorithm.
Our web app prototype. Front-end UI is written in ReactJS and back-end that interacts with the ML model is written in Python3 and uses Flask.
src is broken into 3 main pages which are all routed by App.js: (for more detailed documentation, refer to the README inside react-flask-app)
- Homepage: All components that appear on the bias-detecting page ("/")
- Deets: All components that appear on the deets page, which displays technical details about our application ("/deets")
- AboutUs: All components that appear on the about us page ("/about-us")
Research from the brainstorming/development process, meeting notes, etc.