Instructions to use Cesar42/bert-base-uncased-emotion_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Cesar42/bert-base-uncased-emotion_v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Cesar42/bert-base-uncased-emotion_v2")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Cesar42/bert-base-uncased-emotion_v2") model = AutoModelForSequenceClassification.from_pretrained("Cesar42/bert-base-uncased-emotion_v2") - Notebooks
- Google Colab
- Kaggle
Update config.json
#1
by Mistiq - opened
- config.json +12 -12
config.json
CHANGED
|
@@ -10,22 +10,22 @@
|
|
| 10 |
"hidden_dropout_prob": 0.1,
|
| 11 |
"hidden_size": 768,
|
| 12 |
"id2label": {
|
| 13 |
-
"0": "
|
| 14 |
-
"1": "
|
| 15 |
-
"2": "
|
| 16 |
-
"3": "
|
| 17 |
-
"4": "
|
| 18 |
-
"5": "
|
| 19 |
},
|
| 20 |
"initializer_range": 0.02,
|
| 21 |
"intermediate_size": 3072,
|
| 22 |
"label2id": {
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
},
|
| 30 |
"layer_norm_eps": 1e-12,
|
| 31 |
"max_position_embeddings": 512,
|
|
|
|
| 10 |
"hidden_dropout_prob": 0.1,
|
| 11 |
"hidden_size": 768,
|
| 12 |
"id2label": {
|
| 13 |
+
"0": "sadness",
|
| 14 |
+
"1": "joy",
|
| 15 |
+
"2": "love",
|
| 16 |
+
"3": "anger",
|
| 17 |
+
"4": "fear",
|
| 18 |
+
"5": "surprise"
|
| 19 |
},
|
| 20 |
"initializer_range": 0.02,
|
| 21 |
"intermediate_size": 3072,
|
| 22 |
"label2id": {
|
| 23 |
+
"sadness": 0,
|
| 24 |
+
"joy": 1,
|
| 25 |
+
"love": 2,
|
| 26 |
+
"anger": 3,
|
| 27 |
+
"fear": 4,
|
| 28 |
+
"surprise": 5
|
| 29 |
},
|
| 30 |
"layer_norm_eps": 1e-12,
|
| 31 |
"max_position_embeddings": 512,
|