- Clone this repo
- In Chrome, navigate to
chrome://extensions/
. Make sure the "Developer mode" checkbox is checked - Click "Load unpacked extension..." and navigate to the repo's frontend/ subdirectory
The extension can currently predict if an article should be classified as "Conservative" or "Liberal", which are essentially aliases for similarity to Guardian and Breitbart articles (the two sources that the model is currently trained on).
- Adds a button to the Chrome browser UI which, when clicked, makes a POST request to the backend for the score.
- The Flask backend uses the newspaper module to extract the plain text of the article.
- The backend then feeds the text through the trained model and returns the predicted label to the extension.
- The extension displays the score in a popup.