Instructions to use neuraly/bert-base-italian-cased-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use neuraly/bert-base-italian-cased-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="neuraly/bert-base-italian-cased-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("neuraly/bert-base-italian-cased-sentiment") model = AutoModelForSequenceClassification.from_pretrained("neuraly/bert-base-italian-cased-sentiment") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +6 -6
config.json
CHANGED
|
@@ -15,18 +15,18 @@
|
|
| 15 |
"hidden_dropout_prob": 0.1,
|
| 16 |
"hidden_size": 768,
|
| 17 |
"id2label": {
|
| 18 |
-
"0": "
|
| 19 |
-
"1": "
|
| 20 |
-
"2": "
|
| 21 |
},
|
| 22 |
"initializer_range": 0.02,
|
| 23 |
"intermediate_size": 3072,
|
| 24 |
"is_decoder": false,
|
| 25 |
"is_encoder_decoder": false,
|
| 26 |
"label2id": {
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
-
"
|
| 30 |
},
|
| 31 |
"layer_norm_eps": 1e-12,
|
| 32 |
"length_penalty": 1.0,
|
|
|
|
| 15 |
"hidden_dropout_prob": 0.1,
|
| 16 |
"hidden_size": 768,
|
| 17 |
"id2label": {
|
| 18 |
+
"0": "negative",
|
| 19 |
+
"1": "neutral",
|
| 20 |
+
"2": "positive"
|
| 21 |
},
|
| 22 |
"initializer_range": 0.02,
|
| 23 |
"intermediate_size": 3072,
|
| 24 |
"is_decoder": false,
|
| 25 |
"is_encoder_decoder": false,
|
| 26 |
"label2id": {
|
| 27 |
+
"negative": 0,
|
| 28 |
+
"neutral": 1,
|
| 29 |
+
"positive": 2
|
| 30 |
},
|
| 31 |
"layer_norm_eps": 1e-12,
|
| 32 |
"length_penalty": 1.0,
|