Downloads · 30 days
6
3% of all-time downloads
Bangkah/atha-text-classifier
atha-text-classifier is a text classification model from Bangkah. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
Model ini adalah fine-tuned indobenchmark/indobert-base-p1 untuk klasifikasi sentimen Bahasa Indonesia 3 kelas.
Downloads · 30 days
6
3% of all-time downloads
All-time downloads
236
Public
Parameters
124M
1.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors498 MB · 100%
From the Hugging Face model README
Model ini adalah fine-tuned indobenchmark/indobert-base-p1 untuk klasifikasi sentimen Bahasa Indonesia 3 kelas.
Label output:
negativeneutralpositiveTraining data: https://huggingface.co/datasets/Bangkah/atha-text-dataset
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "Bangkah/atha-text-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "produk ini bagus dan pengirimannya cepat"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
logits = model(**inputs).logits
probs = torch.softmax(logits, dim=-1)[0]
label_id = int(torch.argmax(probs).item())
label = model.config.id2label[label_id]
score = float(probs[label_id].item())
print({"label": label, "confidence": round(score, 4)})
| true\pred | negative | neutral | positive |
|---|---|---|---|
| negative | 100 | 0 | 0 |
| neutral | 0 | 100 | 0 |
| positive | 0 | 0 | 100 |
precision recall f1-score support
negative 1.0000 1.0000 1.0000 100
neutral 1.0000 1.0000 1.0000 100
positive 1.0000 1.0000 1.0000 100
accuracy 1.0000 300
macro avg 1.0000 1.0000 1.0000 300
weighted avg 1.0000 1.0000 1.0000 300