JonatanGk commited on
Commit
a20b586
1 Parent(s): 65eb97f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -13
README.md CHANGED
@@ -1,7 +1,8 @@
1
  ---
2
  license: apache-2.0
 
3
  tags:
4
- - generated_from_trainer
5
  datasets:
6
  - catalonia_independence
7
  metrics:
@@ -20,29 +21,26 @@ model-index:
20
  - name: Accuracy
21
  type: accuracy
22
  value: 0.7611940298507462
 
 
 
 
23
  ---
24
 
25
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
26
- should probably proofread and complete it, then remove this comment. -->
27
-
28
- # roberta-base-ca-finetuned-mnli
29
 
30
  This model is a fine-tuned version of [BSC-TeMU/roberta-base-ca](https://huggingface.co/BSC-TeMU/roberta-base-ca) on the catalonia_independence dataset.
31
  It achieves the following results on the evaluation set:
32
  - Loss: 0.6065
33
  - Accuracy: 0.7612
34
 
35
- ## Model description
36
-
37
- More information needed
38
-
39
- ## Intended uses & limitations
40
-
41
- More information needed
42
 
43
  ## Training and evaluation data
44
 
45
- More information needed
 
 
46
 
47
  ## Training procedure
48
 
@@ -68,9 +66,51 @@ The following hyperparameters were used during training:
68
  | 0.3837 | 5.0 | 1885 | 0.7232 | 0.7582 |
69
 
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  ### Framework versions
72
 
73
  - Transformers 4.11.3
74
  - Pytorch 1.9.0+cu111
75
  - Datasets 1.12.1
76
  - Tokenizers 0.10.3
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language: ca
4
  tags:
5
+ - "catalan"
6
  datasets:
7
  - catalonia_independence
8
  metrics:
 
21
  - name: Accuracy
22
  type: accuracy
23
  value: 0.7611940298507462
24
+ widget:
25
+ - text: "Puigdemont, a l'estat espanyol: Quatre anys després, ens hem guanyat el dret a dir prou"
26
+ - text: "Llarena demana la detenció de Comín i Ponsatí aprofitant que són a Itàlia amb Puigdemont"
27
+ - text: "Assegura l'expert que en un 46% els catalans s'inclouen dins del que es denomina com el doble sentiment identitari. És a dir, se senten tant catalans com espanyols. 1 de cada cinc, en canvi, té un sentiment excloent, només se senten catalans, i un 4% sol espanyol."
28
  ---
29
 
30
+ # roberta-base-ca-finetuned-catalonia-independence-detector
 
 
 
31
 
32
  This model is a fine-tuned version of [BSC-TeMU/roberta-base-ca](https://huggingface.co/BSC-TeMU/roberta-base-ca) on the catalonia_independence dataset.
33
  It achieves the following results on the evaluation set:
34
  - Loss: 0.6065
35
  - Accuracy: 0.7612
36
 
37
+ <details>
 
 
 
 
 
 
38
 
39
  ## Training and evaluation data
40
 
41
+ This dataset contains two corpora in Spanish and Catalan that consist of annotated Twitter messages for automatic stance detection. The data was collected over 12 days during February and March of 2019 from tweets posted in Barcelona, and during September of 2018 from tweets posted in the town of Terrassa, Catalonia.
42
+
43
+ Each corpus is annotated with three classes: AGAINST, FAVOR and NEUTRAL, which express the stance towards the target - independence of Catalonia.
44
 
45
  ## Training procedure
46
 
 
66
  | 0.3837 | 5.0 | 1885 | 0.7232 | 0.7582 |
67
 
68
 
69
+ </details>
70
+
71
+ ### Model in action 🚀
72
+
73
+ Fast usage with **pipelines**:
74
+
75
+ ```python
76
+
77
+ from transformers import pipeline
78
+
79
+ model_path = "JonatanGk/roberta-base-ca-finetuned-catalonia-independence-detector"
80
+ independence_analysis = pipeline("text-classification", model=model_path, tokenizer=model_path)
81
+
82
+ independence_analysis(
83
+ "Assegura l'expert que en un 46% els catalans s'inclouen dins del que es denomina com el doble sentiment identitari. És a dir, se senten tant catalans com espanyols. 1 de cada cinc, en canvi, té un sentiment excloent, només se senten catalans, i un 4% sol espanyol."
84
+ )
85
+ # Output:
86
+ [{'label': 'AGAINST', 'score': 0.7457581758499146}]
87
+
88
+ independence_analysis(
89
+ "Llarena demana la detenció de Comín i Ponsatí aprofitant que són a Itàlia amb Puigdemont"
90
+ )
91
+ # Output:
92
+ [{'label': 'NEUTRAL', 'score': 0.7436802983283997}]
93
+
94
+ independence_analysis(
95
+ "Puigdemont, a l'estat espanyol: Quatre anys després, ens hem guanyat el dret a dir prou"
96
+ )
97
+ # Output:
98
+ [{'label': 'FAVOR', 'score': 0.9040119647979736}]
99
+
100
+
101
+ ```
102
+
103
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JonatanGk/Shared-Colab/blob/master/Catalonia_independence_Detector_(CATALAN).ipynb#scrollTo=j29NHJtOyAVU)
104
+
105
+
106
  ### Framework versions
107
 
108
  - Transformers 4.11.3
109
  - Pytorch 1.9.0+cu111
110
  - Datasets 1.12.1
111
  - Tokenizers 0.10.3
112
+
113
+
114
+ ## Citation
115
+
116
+ Thx to HF.co & [@lewtun](https://github.com/lewtun) for Dataset ;)