Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: es
|
3 |
+
license: apache-2.0
|
4 |
+
---
|
5 |
+
|
6 |
+
# xlm-r-finetuned-toxic-political-tweets-es
|
7 |
+
|
8 |
+
This model is based on the pre-trained model [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) and was fine-tuned on a dataset of tweets from members of the [Spanish Congress of the Deputies](https://www.congreso.es/) annotated regarding the level of political toxicity they generate.
|
9 |
+
|
10 |
+
### Inputs
|
11 |
+
|
12 |
+
The model has been trained on the text of Spanish tweets authored by politicians in 2021, so this is the input expected and its performance can degrade when applied to texts from other domains.
|
13 |
+
|
14 |
+
### Outputs
|
15 |
+
|
16 |
+
The model predicts 2 signals of political toxicity:
|
17 |
+
|
18 |
+
* Toxic: the tweet has at least some degree of toxicity.
|
19 |
+
* Very Toxic: the tweet has a strong degree of toxicity.
|
20 |
+
|
21 |
+
A value between 0 and 1 is predicted for each signal.
|
22 |
+
|
23 |
+
### How to use
|
24 |
+
|
25 |
+
The model can be used directly with a text-classification pipeline:
|
26 |
+
|
27 |
+
```python
|
28 |
+
text = "Es usted un auténtico impresentable, su señoría."
|
29 |
+
|
30 |
+
pipe = pipeline("text-classification", model="Newtral/xlm-r-finetuned-toxic-political-tweets-es")
|
31 |
+
pipe(text, return_all_scores=True)
|
32 |
+
```
|