
[**GitHub Homepage**](https://github.com/wonrax/phobert-base-vietnamese-sentiment)

A model fine-tuned for sentiment analysis based on [vinai/phobert-base](https://huggingface.co/vinai/phobert-base).

Labels:
- NEG: Negative
- POS: Positive
- NEU: Neutral

Dataset: [30K e-commerce reviews](https://www.kaggle.com/datasets/linhlpv/vietnamese-sentiment-analyst)

## Usage
```python
import torch
from transformers import RobertaForSequenceClassification, AutoTokenizer

model = RobertaForSequenceClassification.from_pretrained("wonrax/phobert-base-vietnamese-sentiment")

tokenizer = AutoTokenizer.from_pretrained("wonrax/phobert-base-vietnamese-sentiment", use_fast=False)

# Just like PhoBERT: INPUT TEXT MUST BE ALREADY WORD-SEGMENTED!
sentence = 'Đây là mô_hình rất hay , phù_hợp với điều_kiện và như cầu của nhiều người .'  

input_ids = torch.tensor([tokenizer.encode(sentence)])

with torch.no_grad():
    out = model(input_ids)
    print(out.logits.softmax(dim=-1).tolist())
    # Output:
    # [[0.002, 0.988, 0.01]]
    #     ^      ^      ^
    #    NEG    POS    NEU
```

{"language": ["vi"], "license": "mit", "tags": ["sentiment", "classification"], "widget": [{"text": "Kh\u00f4ng th\u1ec3 n\u00e0o \u0111\u1eb9p h\u01a1n"}, {"text": "Qu\u00e1 ph\u00ed ti\u1ec1n, m\u00e0 kh\u00f4ng \u0111\u1eb9p"}, {"text": "C\u00e1i n\u00e0y gi\u00e1 \u1ed5n kh\u00f4ng nh\u1ec9?"}]}
transformers pytorch roberta text-classification sentiment classification vi license:mit autotrain_compatible endpoints_compatible has_space region:us
TAGS
#transformers #pytorch #roberta #text-classification #sentiment #classification #vi #license-mit #autotrain_compatible #endpoints_compatible #has_space #region-us 


GitHub Homepage

A model fine-tuned for sentiment analysis based on vinai/phobert-base.

Labels:
- NEG: Negative
- POS: Positive
- NEU: Neutral

Dataset: 30K e-commerce reviews

## Usage


## Usage
TAGS
#transformers #pytorch #roberta #text-classification #sentiment #classification #vi #license-mit #autotrain_compatible #endpoints_compatible #has_space #region-us 
 ## Usage
passage: TAGS
#transformers #pytorch #roberta #text-classification #sentiment #classification #vi #license-mit #autotrain_compatible #endpoints_compatible #has_space #region-us 
## Usage