Text Classification
Transformers
Safetensors
Indonesian
bert
sentiment-analysis
indonesian
text-embeddings-inference
Instructions to use Bangkah/atha-text-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Bangkah/atha-text-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Bangkah/atha-text-classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Bangkah/atha-text-classifier") model = AutoModelForSequenceClassification.from_pretrained("Bangkah/atha-text-classifier") - Notebooks
- Google Colab
- Kaggle
metadata
library_name: transformers
license: apache-2.0
base_model: indobenchmark/indobert-base-p1
language:
- id
datasets:
- Bangkah/atha-text-dataset
tags:
- sentiment-analysis
- text-classification
- indonesian
metrics:
- accuracy
- f1
atha-text-classifier
Model ini adalah fine-tuned indobenchmark/indobert-base-p1 untuk klasifikasi sentimen Bahasa Indonesia 3 kelas.
Label output:
negativeneutralpositive
Training data: https://huggingface.co/datasets/Bangkah/atha-text-dataset
Quick Use (Transformers)
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)})
Limitations
- Dataset training masih sintetis, sehingga metrik tinggi tidak langsung merepresentasikan performa produksi.
- Untuk use-case production, tetap lakukan fine-tuning ulang dengan data real domain aplikasi.
Validation Metrics
- Loss: 0.0004
- Accuracy: 1.0000
- Macro F1: 1.0000
Confusion Matrix
| true\pred | negative | neutral | positive |
|---|---|---|---|
| negative | 100 | 0 | 0 |
| neutral | 0 | 100 | 0 |
| positive | 0 | 0 | 100 |
Classification Report
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