codewithdark / bert-Gomotions

huggingface.co
Total runs: 29
24-hour runs: 0
7-day runs: 13
30-day runs: -231
Model's Last Updated: January 29 2025
text-classification

Introduction of bert-Gomotions

Model Details of bert-Gomotions

🔥 Fine-Tuned BERT on GoEmotions Dataset

📖 Model Overview

This model is a fine-tuned version of BERT ( bert-base-uncased ) on the GoEmotions dataset for multi-label emotion classification . It can predict multiple emotions per input text.

📊 Performance
Metric Score
Accuracy 46.57%
F1 Score 56.41%
Hamming Loss 3.39%
📂 Model Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Load model and tokenizer
model_name = "codewithdark/bert-Gomotions"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

# Emotion labels (adjust based on your dataset)
emotion_labels = [
    "Admiration", "Amusement", "Anger", "Annoyance", "Approval", "Caring", "Confusion",
    "Curiosity", "Desire", "Disappointment", "Disapproval", "Disgust", "Embarrassment",
    "Excitement", "Fear", "Gratitude", "Grief", "Joy", "Love", "Nervousness", "Optimism",
    "Pride", "Realization", "Relief", "Remorse", "Sadness", "Surprise", "Neutral"
]

# Example text
text = "I'm so happy today!"
inputs = tokenizer(text, return_tensors="pt")

# Predict
with torch.no_grad():
    outputs = model(**inputs)
    probs = torch.sigmoid(outputs.logits).squeeze(0)  # Convert logits to probabilities

# Get top 5 predictions
top5_indices = torch.argsort(probs, descending=True)[:5]  # Get indices of top 5 labels
top5_labels = [emotion_labels[i] for i in top5_indices]
top5_probs = [probs[i].item() for i in top5_indices]

# Print results
print("Top 5 Predicted Emotions:")
for label, prob in zip(top5_labels, top5_probs):
    print(f"{label}: {prob:.4f}")

'''
output:
Top 5 Predicted Emotions:
Joy: 0.9478
Love: 0.7854
Optimism: 0.6342
Admiration: 0.5678
Excitement: 0.5231
'''
🏋️‍♂️ Training Details
  • Model: bert-base-uncased
  • Dataset: GoEmotions
  • Optimizer: AdamW
  • Loss Function: BCEWithLogitsLoss (Binary Cross-Entropy for multi-label classification)
  • Batch Size: 16
  • Epochs: 3
  • Evaluation Metrics: Accuracy, F1 Score, Hamming Loss
📌 How to Use in Hugging Face
from transformers import pipeline

classifier = pipeline("text-classification", model="codewithdark/bert-Gomotions", top_k=None)
classifier("I'm so excited about the trip!")
🛠️ Citation

If you use this model, please cite:

@misc{your_model,
  author = {codewithdark},
  title = {Fine-tuned BERT on GoEmotions},
  year = {2025},
  url = {https://huggingface.co/codewithdark/bert-Gomotions}
}

Runs of codewithdark bert-Gomotions on huggingface.co

29
Total runs
0
24-hour runs
12
3-day runs
13
7-day runs
-231
30-day runs

More Information About bert-Gomotions huggingface.co Model

More bert-Gomotions license Visit here:

https://choosealicense.com/licenses/apache-2.0

bert-Gomotions huggingface.co

bert-Gomotions huggingface.co is an AI model on huggingface.co that provides bert-Gomotions's model effect (), which can be used instantly with this codewithdark bert-Gomotions model. huggingface.co supports a free trial of the bert-Gomotions model, and also provides paid use of the bert-Gomotions. Support call bert-Gomotions model through api, including Node.js, Python, http.

codewithdark bert-Gomotions online free

bert-Gomotions huggingface.co is an online trial and call api platform, which integrates bert-Gomotions's modeling effects, including api services, and provides a free online trial of bert-Gomotions, you can try bert-Gomotions online for free by clicking the link below.

codewithdark bert-Gomotions online free url in huggingface.co:

https://huggingface.co/codewithdark/bert-Gomotions

bert-Gomotions install

bert-Gomotions is an open source model from GitHub that offers a free installation service, and any user can find bert-Gomotions on GitHub to install. At the same time, huggingface.co provides the effect of bert-Gomotions install, users can directly use bert-Gomotions installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

bert-Gomotions install url in huggingface.co:

https://huggingface.co/codewithdark/bert-Gomotions

Url of bert-Gomotions

Provider of bert-Gomotions huggingface.co

codewithdark
ORGANIZATIONS

Other API from codewithdark

huggingface.co

Total runs: 2
Run Growth: 2
Growth Rate: 100.00%
Updated:September 15 2024
huggingface.co

Total runs: 2
Run Growth: -5
Growth Rate: -250.00%
Updated:April 06 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 03 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 26 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 01 2024