Instructions to use Osiris/emotion_classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Osiris/emotion_classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Osiris/emotion_classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Osiris/emotion_classifier") model = AutoModelForSequenceClassification.from_pretrained("Osiris/emotion_classifier") - Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Introduction:
|
| 2 |
+
This model belongs to text-classification. You can check whether the sentence consists any emotion.
|
| 3 |
+
### Label Explaination:
|
| 4 |
+
LABEL_1: Positive (have positive emotion)
|
| 5 |
+
|
| 6 |
+
LABEL_0: Negative (have negative emotion)
|
| 7 |
+
### Usage:
|
| 8 |
+
```python
|
| 9 |
+
>>> from transformers import pipeline
|
| 10 |
+
>>> ec = pipeline('sentiment-analysis', model='emotion_classifer')
|
| 11 |
+
>>> ec("Hello, I'm a good model.")
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
### Accuracy:
|
| 15 |
+
We reach 93.98% for validation dataset, and 91.92% for test dataset.
|