This chrome extension extract titles (text that appears when we hover over a link) of all the links of the post and send these text to the server that is running the Sentiment Analyzer model (Transformer network based GPT2 model fine tuned on the imdb dataset). Upon request is served by the model output i.e. list of positive or negative sentiment is sent to the webpage that has initiated the request. To initiate a request, just refresh the page and chrome extension installed will do the work of sending the request to the server in the background.
- Download and extract the above code
- Open the Chrome browser
- type: chrome://extensions in the url bar
- On the top-right corner, turn on the developer mode
- On the top-left, click the "Load unpacked" and select the folder that has this downloded code
- Now, chrome extension has started its work
- Go to the ModelServe folder
- Run the finetune-transformer-on-imdb5k.ipynb file, it'll train the model
- Run test.ipynb file, it'll start the server which listens to the POST request from the chrome extension