Downloads · 30 days
13
10% of all-time downloads
ZenyxS/indobert-emotion-emotionclf
indobert-emotion-emotionclf is a text classification model from ZenyxS. 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.
A fine-tuned IndoBERT model for Indonesian-language emotion classification in conversational or chatbot contexts. This model was developed as part of a research project on detecting user satisfaction and emotional sta…
Downloads · 30 days
13
10% of all-time downloads
All-time downloads
129
Public
Parameters
124M
498 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors498 MB · 100%
From the Hugging Face model README
A fine-tuned IndoBERT model for Indonesian-language emotion classification in conversational or chatbot contexts.
This model was developed as part of a research project on detecting user satisfaction and emotional states from short-text feedback and responses.
It classifies input text into one of five emotions:
username/indobert-emotion-classifier <!-- replace `username` with your HF username -->id)Frustrasi, Marah) are underrepresented — this leads to low recall for those classes.from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
model_name = "username/indobert-emotion-classifier" # replace 'username' with your HF username
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer, return_all_scores=True)
text = "Apaan sih ini, nggak jelas banget!"
print(classifier(text))
✅ Example Output:
python
[
{'label': 'Frustrasi', 'score': 0.3700},
{'label': 'Bingung', 'score': 0.3357},
{'label': 'Netral', 'score': 0.1256},
{'label': 'Marah', 'score': 0.1058},
{'label': 'Senang', 'score': 0.0629}
]
A fine-tuned IndoBERT model for classifying emotions in Indonesian short-chat responses.
Developed as part of a student research project at SMKN 21 Jakarta.
⚠️ Note: The dataset is imbalanced, particularly for Frustrasi and Marah. This strongly affects per-class performance.
| Label | Precision | Recall | F1 |
|---|---|---|---|
| Senang | 0.21 | 0.38 | 0.27 |
| Netral | 0.54 | 0.26 | 0.35 |
| Bingung | 0.35 | 0.56 | 0.43 |
| Frustrasi | 0.04 | 0.04 | 0.04 |
| Marah | 0.00 | 0.00 | 0.00 |
Interpretation:
The model captures dominant intents (neutral, confused, positive) reasonably well, but struggles with rare classes (Frustrasi, Marah) due to dataset imbalance.
def predict(text, classifier):
scores = classifier(text)[0]
return sorted(scores, key=lambda x: x["score"], reverse=True)[0]
print(predict("Apaan sih ini, nggak jelas banget!"))
# → Frustrasi (0.37)
print(predict("Aku sangat senang jawabannya jelas sekali"))
# → Senang (0.42)
print(predict("Hah? Maksudnya gimana?"))
# → Bingung (0.37)
Architecture: IndoBERT (BERT-base: 12 layers, 768 hidden, 12 heads, ~110M parameters)
Fine-tuning: Full fine-tuning (all layers)
Training time: ~2 minutes/epoch on NVIDIA T4 (reported)
Framework: 🤗 Transformers + PyTorch
Author: Fabian Prasetyo
Institution: SMKN 21 Jakarta
Email: [email protected]
If you use this model, please cite it as:
@misc{prasetyo2025indobert,
title={IndoBERT Emotion Classifier},
author={Fabian Prasetyo},
institution={SMKN 21 Jakarta},
year={2025},
howpublished={\url{https://huggingface.co/username/indobert-emotion-classifier}}
}