Update README.md
Browse files
README.md
CHANGED
|
@@ -33,9 +33,9 @@ A multilingual [XLM-R-based (100 languages)](https://huggingface.co/FacebookAI/x
|
|
| 33 |
|
| 34 |
**Fine-tuning hyperparameters**
|
| 35 |
|
| 36 |
-
num_train_epochs=3,
|
| 37 |
-
train_batch_size=8,
|
| 38 |
-
learning_rate=6e-6
|
| 39 |
|
| 40 |
**Evaluation Results**
|
| 41 |
Model agreement (accuracy) vs. Inter-annotator agreement (0 - no agreement; 100 - perfect agreement):
|
|
@@ -56,15 +56,15 @@ Class-specific model F1-scores:
|
|
| 56 |
|
| 57 |
from transformers import AutoModelForSequenceClassification, TextClassificationPipeline, AutoTokenizer, AutoConfig
|
| 58 |
|
| 59 |
-
MODEL = "classla/xlm-r-parlasent"
|
| 60 |
-
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
| 61 |
-
config = AutoConfig.from_pretrained(MODEL)
|
| 62 |
-
model = AutoModelForSequenceClassification.from_pretrained(MODEL)
|
| 63 |
-
|
| 64 |
-
pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True,
|
| 65 |
-
task='sentiment_analysis', device=0, function_to_apply="none")
|
| 66 |
-
pipe([
|
| 67 |
-
"Thank you for using our model",
|
| 68 |
-
"Grazie per aver utilizzato il nostro modello"
|
| 69 |
-
"Hvala za uporabo našega modela"
|
| 70 |
-
])
|
|
|
|
| 33 |
|
| 34 |
**Fine-tuning hyperparameters**
|
| 35 |
|
| 36 |
+
num_train_epochs=3,
|
| 37 |
+
train_batch_size=8,
|
| 38 |
+
learning_rate=6e-6
|
| 39 |
|
| 40 |
**Evaluation Results**
|
| 41 |
Model agreement (accuracy) vs. Inter-annotator agreement (0 - no agreement; 100 - perfect agreement):
|
|
|
|
| 56 |
|
| 57 |
from transformers import AutoModelForSequenceClassification, TextClassificationPipeline, AutoTokenizer, AutoConfig
|
| 58 |
|
| 59 |
+
MODEL = "classla/xlm-r-parlasent"
|
| 60 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
| 61 |
+
config = AutoConfig.from_pretrained(MODEL)
|
| 62 |
+
model = AutoModelForSequenceClassification.from_pretrained(MODEL)
|
| 63 |
+
|
| 64 |
+
pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True,
|
| 65 |
+
task='sentiment_analysis', device=0, function_to_apply="none")
|
| 66 |
+
pipe([
|
| 67 |
+
"Thank you for using our model",
|
| 68 |
+
"Grazie per aver utilizzato il nostro modello"
|
| 69 |
+
"Hvala za uporabo našega modela"
|
| 70 |
+
])
|