Views
No views yet
1from transformers import pipeline
2
3classifier = pipeline("text-classification", model="fasherr/toxicity_rubert")
4text_1 = "Ты сегодня прекрасно выглядишь!"
5text_2 = "Ты очень плохой человек"
6print(classifier(text_1))
7# [{'label': 'NEUTRAL', 'score': 0.99...}]
8print(classifier(text_2))
9#[{'label': 'TOXIC', 'score': 1}]| Category | Accuracy | Precision | Recall | F1-Score | AUC-ROC | Support |
|---|---|---|---|---|---|---|
| Overall | 97.93% | 96.37% | 96.86% | 96.61% | 0.9962 | 26271 |
| Neutral | - | 98.88% | 98.57% | 98.72% | - | 21347 |
| Toxic | - | 93.87% | 95.15% | 94.50% | - | 4924 |