Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- text-classification
|
| 5 |
+
- emotion-detection
|
| 6 |
+
- bert
|
| 7 |
+
- huggingface
|
| 8 |
+
language:
|
| 9 |
+
- en
|
| 10 |
+
pipeline_tag: text-classification
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# BERT-based Emotion Classification Model 🎭
|
| 14 |
+
|
| 15 |
+
This model is a fine-tuned version of BERT for **emotion classification**. It predicts one of six emotion categories from a given English text input.
|
| 16 |
+
|
| 17 |
+
## 🧠 Model Details
|
| 18 |
+
|
| 19 |
+
- **Architecture**: `BertForSequenceClassification`
|
| 20 |
+
- **Base Model**: `bert-base-uncased`
|
| 21 |
+
- **Labels**:
|
| 22 |
+
- `0`: sadness
|
| 23 |
+
- `1`: joy
|
| 24 |
+
- `2`: love
|
| 25 |
+
- `3`: anger
|
| 26 |
+
- `4`: fear
|
| 27 |
+
- `5`: surprise
|
| 28 |
+
- **Problem Type**: Single-label classification
|
| 29 |
+
- **Hidden Size**: 768
|
| 30 |
+
- **Max Sequence Length**: 512
|
| 31 |
+
- **Number of Layers**: 12
|
| 32 |
+
|
| 33 |
+
## 🚀 How to Use
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
from transformers import pipeline
|
| 37 |
+
|
| 38 |
+
classifier = pipeline("text-classification", model="AbhishekBhavnani/TweetClassification")
|
| 39 |
+
result = classifier("I'm feeling so happy today!")
|
| 40 |
+
print(result)
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## Example
|
| 44 |
+
|
| 45 |
+
**Input**:
|
| 46 |
+
```text
|
| 47 |
+
I can't stop smiling, this movie is too funny!
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
**Input**:
|
| 51 |
+
```text
|
| 52 |
+
[{'label': 'joy', 'score': 0.9821}]
|
| 53 |
+
```
|