Wall-JuniorVB🤖
Junior-VB🤖

A model and web app service in ABSA about smartphone review.

DataModelWebCreditsRelatedLicense

Alt Text

📁Data

📈Model

🤝Pre-trained Model And Fine-tuning

  • We using PhoBERT-base model, which was created by VinAI for our problem and were inspired of fine-tuning by Quan Dang.
  • You can read more details in this paper.
  • With our model, we fine tune by use slow learning rate (1e-4) and small weight decay (5e-3) of AdamW. In the 3 last pooling layers, it performance look quite better than anything.

🌊Results

  • You can visit our report for more information about the data, preprocessing and experiment setup.
  • Best result:
Tasks Precision Recall F1-Score
Aspect Detection 90.21 87.56 88.56
Polarity Detection 80.59 77.86 78.66
Aspect + Polarity 78.39 68.00 68.41

🤗Web

  • 📝Predict random text from keyboard
    • You can try our service by enter some review about phone before uploading file.
    • By this, you can understand clearly our result.
  • 🗂️Upload file
    • The limit space of streamlit is 200MB. We sorry about that.
    • From now, our model accepts 3 type of file: csv, json and excel.
    • The processing for file input may take time depending on size of file.

🧑‍💻How To Use

To clone and run this application, you'll need Git and Pip installed on your computer. From your command line:

For training models

# Clone this repository
$ git clone https://github.com/leanhtu-AI/Sentiment-Analysis.git

# Go into the repository
$ cd Sentiment-Analysis

# Install dependencies
$ pip install requirements.txt

$ python train.py

Tip

I have setup for training models with gpu already, if you don't have gpu and still want training or fine tuning by yourself, you should go to this notebook or download weights here

For running web (local)

$ streamlit run app.py

Tip

When you running the first time, it will download the model weights(.h5) to your local filesystem. For faster running next time, you should create a folder named 'model' and move the h5 file to that. Then go to predict.py comment the downloaded model weights on cloud and uncomment the load weights local.

Note

We use the Windows command, if you are running on MacOS or Linux, you might to modify because it can be different a bit.

👉Credits

This repo uses the following open source packages:

📢Related

Junior-VB-web - Web version link of our model.

Important

We encourage you to run this by streamlit on local becaue the web is not always available on streamlit cloud.

📝License

MIT