Downloads · 30 days
13
13% of all-time downloads
hiuS04/phobert-sentiment-api
phobert-sentiment-api is a text classification model from hiuS04. Use it when you need a label for a piece of text. The card lists the license as mit.
Fine-tuned PhoBERT model for Vietnamese product review sentiment classification (Positive / Neutral / Negative).
Downloads · 30 days
13
13% of all-time downloads
All-time downloads
103
Public
Parameters
135M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors540 MB · 100%
From the Hugging Face model README
Fine-tuned PhoBERT model for Vietnamese product review sentiment classification (Positive / Neutral / Negative).
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "hiuS04/phobert-sentiment-api"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "Sản phẩm rất tốt và đáng tiền"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
pred = torch.softmax(outputs.logits, dim=-1)
print(pred)