arianpasquali commited on
Commit
a9381f1
1 Parent(s): c777d22

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +64 -0
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_type: "text-classification"
3
+
4
+ widget:
5
+ - text: "this is a lovely message"
6
+ example_title: "Example 1"
7
+ multi_class: false
8
+ - text: "you are an idiot and you and your family should go back to your country"
9
+ example_title: "Example 2"
10
+ multi_class: false
11
+
12
+
13
+ language:
14
+ - en
15
+ - nl
16
+ - fr
17
+ - pt
18
+ - it
19
+ - es
20
+ - de
21
+ - da
22
+ - pl
23
+ - af
24
+
25
+ datasets:
26
+ - jigsaw_toxicity_pred
27
+ metrics:
28
+ - F1 Accuracy
29
+ ---
30
+
31
+ # citizenlab/twitter-xlm-roberta-base-sentiment-finetunned
32
+
33
+ This is multilingual XLM-Roberta model sequence classifier fine tunned and based on [Cardiff NLP Group](cardiffnlp/twitter-roberta-base-sentiment) sentiment classification model.
34
+
35
+ ## How to use it
36
+
37
+ ```python
38
+ from transformers import pipeline
39
+
40
+ model_path = "citizenlab/twitter-xlm-roberta-base-sentiment-finetunned"
41
+
42
+ sentiment_classifier = pipeline("text-classification", model=model_path, tokenizer=model_path)
43
+ sentiment_classifier("this is a lovely message")
44
+ > [{'label': 'Positive', 'score': 0.9918450713157654}]
45
+
46
+ sentiment_classifier("you are an idiot and you and your family should go back to your country")
47
+ > [{'label': 'Negative', 'score': 0.9849833846092224}]
48
+
49
+ ```
50
+
51
+ ## Evaluation
52
+
53
+ ```
54
+ precision recall f1-score support
55
+
56
+ Negative 0.57 0.14 0.23 28
57
+ Neutral 0.78 0.94 0.86 132
58
+ Positive 0.89 0.80 0.85 51
59
+
60
+ accuracy 0.80 211
61
+ macro avg 0.75 0.63 0.64 211
62
+ weighted avg 0.78 0.80 0.77 211
63
+ ```
64
+