Edit model card

Sentiment Classifier: Emotion Detection with Sentence Transformer

This model classifies sentiments using the Sentence Transformer, specifically the all-MiniLM-L6-v2 architecture. It's trained on the dair-ai/emotion dataset to identify six basic emotions:

  • Sadness
  • Joy
  • Love
  • Anger
  • Fear
  • Surprise

Developed by: shhossain: https://github.com/shhossain

Model type: Custom

Model Size: 22.7M

Language(s): English

License: Same as all-MiniLM-L6-v2

Finetuned from: all-MiniLM-L6-v2 (https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)

Usage Example

from transformers import pipeline

pipe = pipeline("text-classification", model="shhossain/all-MiniLM-L6-v2-sentiment-classifier", trust_remote_code=True)

result = pipe("This product is excellent!")
result

Output:

[{'label': 'sad', 'score': 0.006396006792783737},
 {'label': 'joy', 'score': 0.7897642254829407},
 {'label': 'love', 'score': 0.17318710684776306},
 {'label': 'anger', 'score': 0.008878232911229134},
 {'label': 'fear', 'score': 0.010075093246996403},
 {'label': 'surprise', 'score': 0.011699344962835312}]
Downloads last month
8
Safetensors
Model size
19.3k params
Tensor type
F32
·
Inference Examples
Inference API (serverless) does not yet support model repos that contain custom code.

Dataset used to train shhossain/all-MiniLM-L6-v2-sentiment-classifier