Update README.md
Browse files
README.md
CHANGED
|
@@ -49,6 +49,21 @@ Now, the models covers 15 languages from various language families:
|
|
| 49 |
| Japanese | ja | 0.8773 |
|
| 50 |
| Tatar | tt | 0.5744 |
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
## Citation
|
| 53 |
The model is prepared for [TextDetox 2025 Shared Task](https://pan.webis.de/clef25/pan25-web/text-detoxification.html) evaluation.
|
| 54 |
|
|
|
|
| 49 |
| Japanese | ja | 0.8773 |
|
| 50 |
| Tatar | tt | 0.5744 |
|
| 51 |
|
| 52 |
+
## How to use
|
| 53 |
+
|
| 54 |
+
```python
|
| 55 |
+
import torch
|
| 56 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 57 |
+
|
| 58 |
+
tokenizer = AutoTokenizer.from_pretrained('textdetox/xlmr-large-toxicity-classifier-v2')
|
| 59 |
+
model = AutoModelForSequenceClassification.from_pretrained('textdetox/xlmr-large-toxicity-classifier-v2')
|
| 60 |
+
|
| 61 |
+
batch = tokenizer.encode("You are amazing!", return_tensors="pt")
|
| 62 |
+
|
| 63 |
+
output = model(batch)
|
| 64 |
+
# idx 0 for neutral, idx 1 for toxic
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
## Citation
|
| 68 |
The model is prepared for [TextDetox 2025 Shared Task](https://pan.webis.de/clef25/pan25-web/text-detoxification.html) evaluation.
|
| 69 |
|