A lightweight, Emotions-powered emotion classification model fine-tuned for
short text sentiment/emotion detection
using BERT architecture.
Each input text is tagged with one of
13 rich emotional categories
, mapped to expressive emotions ๐ญ. This model is ideal for chatbot understanding, social media sentiment, and mental health analysis based on short messages.
๐ซ Supported Emotions
Emotion
Emoji
Sadness
๐ข
Anger
๐
Love
โค๏ธ
Surprise
๐ฒ
Fear
๐ฑ
Happiness
๐
Neutral
๐
Disgust
๐คข
Shame
๐
Guilt
๐
Confusion
๐
Desire
๐ฅ
Sarcasm
๐
๐ Use Cases
๐ง Chatbot emotion understanding
๐ญ Social media sentiment tagging
๐ Mental health context detection
๐ฌ Smart replies and reactions
๐ Emotional tone analysis in text
๐ ๏ธ Usage
๐ Basic Inference Example
A minimal example to predict the emotion behind a simple sentence.
from transformers import pipeline
# Load the fine-tuned BERT Mini sentiment analysis model
sentiment_analysis = pipeline("text-classification", model="boltuix/bert-emotions")
# Analyze sentiment
result = sentiment_analysis("i love you")
print(result)
โ Output
[{'label': 'love', 'score': 0.8442274928092957}]
This means the model predicts the emotion as
Love โค๏ธ
with
84.42%
confidence.
๐ Extended Example with Emoji Mapping
An enhanced version to map model output to human-readable emotion with emojis.
from transformers import pipeline
# Load the fine-tuned BERT-Emotions model
sentiment_analysis = pipeline("text-classification", model="boltuix/bert-emotion")
# Define label-to-emoji mapping
label_to_emoji = {
"Sadness": "๐ข",
"Anger": "๐ ",
"Love": "โค๏ธ",
"Surprise": "๐ฒ",
"Fear": "๐ฑ",
"Happiness": "๐",
"Neutral": "๐",
"Disgust": "๐คข",
"Shame": "๐",
"Guilt": "๐",
"Confusion": "๐",
"Desire": "๐ฅ",
"Sarcasm": "๐"
}
# Input text
text = "i love you"# Analyze emotion
result = sentiment_analysis(text)[0]
label = result["label"].capitalize()
emoji = label_to_emoji.get(label, "โ")
# Outputprint(f"Text: {text}")
print(f"Predicted Emotion: {label}{emoji}")
print(f"Confidence: {result['score']:.2%}")
โ Output
Text: i love you
Predicted Emotion: Love โค๏ธ
Confidence: 84.42%
This version enhances readability and gives an expressive emoji for the predicted emotion.
bert-emotion huggingface.co is an AI model on huggingface.co that provides bert-emotion's model effect (), which can be used instantly with this boltuix bert-emotion model. huggingface.co supports a free trial of the bert-emotion model, and also provides paid use of the bert-emotion. Support call bert-emotion model through api, including Node.js, Python, http.
bert-emotion huggingface.co is an online trial and call api platform, which integrates bert-emotion's modeling effects, including api services, and provides a free online trial of bert-emotion, you can try bert-emotion online for free by clicking the link below.
boltuix bert-emotion online free url in huggingface.co:
bert-emotion is an open source model from GitHub that offers a free installation service, and any user can find bert-emotion on GitHub to install. At the same time, huggingface.co provides the effect of bert-emotion install, users can directly use bert-emotion installed effect in huggingface.co for debugging and trial. It also supports api for free installation.