Downloads · 30 days
483
6% of all-time downloads
shhossain/all-MiniLM-L6-v2-sentiment-classifier
all-MiniLM-L6-v2-sentiment-classifier is a text classification model from shhossain. 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 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:
Downloads · 30 days
483
6% of all-time downloads
All-time downloads
8.5K
Public
Parameters
19.3K
157 KB on disk
Likes
2
Public
Click a slice to open those files.
.bin79.1 KB · 49%
From the Hugging Face model README
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:
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)
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}]