Downloads · 30 days
30
1% of all-time downloads
NikolajMunch/danish-emotion-classification
danish-emotion-classification is a text classification model from NikolajMunch. Use it when you need a label for a piece of text. It is set up for transformers.
Classifies a danish sentence into one of 6 different emotions:
Downloads · 30 days
30
1% of all-time downloads
All-time downloads
3.7K
Public
Repo size
885 MB
Likes
6
Public
Click a slice to open those files.
.bin443 MB · 100%
From the Hugging Face model README
Classifies a danish sentence into one of 6 different emotions:
| Danish emotion | Ekman's emotion |
|---|---|
| 😞 Afsky | Disgust |
| 😨 Frygt | Fear |
| 😄 Glæde | Joy |
| 😱 Overraskelse | Surprise |
| 😢 Tristhed | Sadness |
| 😠 Vrede | Anger |
from transformers import pipeline
model_path = "NikolajMunch/danish-emotion-classification"
classifier = pipeline("sentiment-analysis", model=model_path, tokenizer=model_path)
prediction = classifier("Jeg er godt nok ked af at mine SMS'er er slettet")
print(prediction)
# [{'label': 'Tristhed', 'score': 0.9725030660629272}]
or
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("NikolajMunch/danish-emotion-classification")
model = AutoModelForSequenceClassification.from_pretrained("NikolajMunch/danish-emotion-classification")