Text Classification
Transformers
Safetensors
English
distilbert
emotion-classification
text-embeddings-inference
Instructions to use stake52/emotion-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stake52/emotion-distilbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="stake52/emotion-distilbert")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("stake52/emotion-distilbert") model = AutoModelForSequenceClassification.from_pretrained("stake52/emotion-distilbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from stake52/emotion-distilbert: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/stake52/emotion-distilbert/resolve/main/README.md
- Command line
-
hf download hf://stake52/emotion-distilbert/README.md
-
curl -L -o README.md https://huggingface.co/stake52/emotion-distilbert/resolve/main/README.md
1.13 kB
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-classification | |
| tags: | |
| - emotion-classification | |
| - distilbert | |
| - text-classification | |
| # Emotion Classification with DistilBERT | |
| ## Model Description | |
| A DistilBERT model fine-tuned for six-class English emotion | |
| classification. | |
| ## Base Model | |
| `distilbert/distilbert-base-uncased` | |
| ## Dataset | |
| `dair-ai/emotion` | |
| The dataset contains six emotion classes: | |
| sadness, joy, love, anger, fear, and surprise. | |
| ## Task | |
| Text classification. | |
| ## Usage | |
| ```python | |
| from transformers import pipeline | |
| classifier = pipeline( | |
| "text-classification", | |
| model="stake52/emotion-distilbert" | |
| ) | |
| result = classifier("I am very happy today!") | |
| print(result) | |
| ``` | |
| ## Evaluation | |
| The model was evaluated using accuracy and macro-F1 on the | |
| held-out test split. Report the exact values from the completed | |
| run. | |
| ## Limitations | |
| Emotion classification is subjective and text can contain | |
| multiple or ambiguous emotions. Predictions should not be | |
| interpreted as reliable measurements of a person's mental state. | |
| ## Intended Use | |
| Educational projects, NLP experimentation, and research. | |