Skip to content

About Covid-19 sentiment analysis by fine-tuning bert model

License

Notifications You must be signed in to change notification settings

weishancc/COVID19-SA

Repository files navigation

COVID19-SA

Covid-19 sentiment analysis by fine-tuning bert model basesd on social network.
Also, this repo provides and e2e demo 👨‍💻

📝 Requirements

📔 Usage

Fine-tune bert model

[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.

Live-demo

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

Start web server

$ cd web_demo
$ python web.py

Then you will see the website on localhost:5000 :)

We would like to add bertviz at first, but it seems unsupport on html for now.

📔 Reference

Dateset

Implementation

About

About Covid-19 sentiment analysis by fine-tuning bert model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published