Downloads · 30 days
14
11% of all-time downloads
nikk118/minilm-finetuned-emotion
minilm-finetuned-emotion is a text classification model from nikk118. 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.
This model is fine-tuned from microsoft/MiniLM-L12-H384-uncased to classify text into 6 emotion categories.
Downloads · 30 days
14
11% of all-time downloads
All-time downloads
125
Public
Parameters
33.4M
801 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors133 MB · 99%
From the Hugging Face model README
This model is fine-tuned from microsoft/MiniLM-L12-H384-uncased to classify text into 6 emotion categories.
It can detect emotional tone from user text such as joy, sadness, anger, fear, love, and surprise.
| Label ID | Emotion |
|---|---|
| 0 | sadness |
| 1 | joy |
| 2 | love |
| 3 | anger |
| 4 | fear |
| 5 | surprise |
pip install transformers torch
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="nikk118/minilm-finetuned-emotion"
)
result = classifier("I am really excited about this project")
print(result)
Output:
[{'label': 'joy', 'score': 0.99}]
Dataset used:
https://huggingface.co/datasets/emotion
Training configuration:
Model pipeline:
Input Text
↓
Tokenizer
↓
MiniLM Transformer (12 layers)
↓
CLS token embedding
↓
Linear classification layer
↓
Emotion prediction
This model can be used for:
Created by: Nikk118
Hugging Face: https://huggingface.co/nikk118
Base model:
https://huggingface.co/microsoft/MiniLM-L12-H384-uncased
Dataset: