Covid-19 sentiment analysis by fine-tuning bert model basesd on social network.
Also, this repo provides and e2e demo 👨💻
[Optional] Create and activate your virtual environments first!
$ conda create -n venv
$ source activate venv
Begin to fine-tune
$ python main.py
When training complete, main.py will save accuracy and loss history(training/validate), then we provide two functions in predict.py to get inference (get_predictions / get_prediction_with_single). This step will infernece from test dataloader using function get_predictions
, where live-demo will inference from web's input in live-demo using function get_prediction_with_single
.
We use flask as web server, and interact with web client via ajax. Due to file size limit, we place fine-tuned model weight here, of course, you can change to your weight under folder web_demo
$ cd web_demo
$ python web.py
We would like to add bertviz at first, but it seems unsupport on html for now.