bgonzalezbustamante
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -33,23 +33,20 @@ from transformers import pipeline
|
|
33 |
toxic_classifier = pipeline("text-classification", model="bgonzalezbustamante/bert-spanish-toxicity")
|
34 |
|
35 |
## Non-toxic example
|
36 |
-
toxic_classifier("Que tengas un excelente día :)")
|
37 |
-
```
|
38 |
-
|
39 |
-
Output:
|
40 |
-
|
41 |
-
```
|
42 |
-
[{'label': 'NONTOXIC', 'score': 0.8723140358924866}]
|
43 |
-
```
|
44 |
|
45 |
-
```python
|
46 |
## Toxic example
|
47 |
-
toxic_classifier("Eres un maldito infeliz")
|
|
|
|
|
|
|
|
|
48 |
```
|
49 |
|
50 |
Output:
|
51 |
|
52 |
```
|
|
|
53 |
[{'label': 'TOXIC', 'score': 0.9470418691635132}]
|
54 |
```
|
55 |
|
|
|
33 |
toxic_classifier = pipeline("text-classification", model="bgonzalezbustamante/bert-spanish-toxicity")
|
34 |
|
35 |
## Non-toxic example
|
36 |
+
non_toxic = toxic_classifier("Que tengas un excelente día :)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
|
|
38 |
## Toxic example
|
39 |
+
toxic = toxic_classifier("Eres un maldito infeliz")
|
40 |
+
|
41 |
+
## Print examples
|
42 |
+
print(non_toxic)
|
43 |
+
print(toxic)
|
44 |
```
|
45 |
|
46 |
Output:
|
47 |
|
48 |
```
|
49 |
+
[{'label': 'NONTOXIC', 'score': 0.8723140358924866}]
|
50 |
[{'label': 'TOXIC', 'score': 0.9470418691635132}]
|
51 |
```
|
52 |
|