File size: 1,559 Bytes
3d7df4e 7b97c89 3d7df4e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
---
language:
-
-
thumbnail:
tags:
-
-
-
license:
datasets:
-
-
metrics:
-
-
---
# Toxic language detection
## Model description
A toxic language detection model trained on tweets. The base model is Roberta-large. For more information,
including the **training data**, **limitations and bias**, please refer to the [paper](https://arxiv.org/pdf/2102.00086.pdf) and
Github [repo](https://github.com/XuhuiZhou/Toxic_Debias) for more details.
#### How to use
Note that LABEL_1 means toxic and LABEL_0 means non-toxic in the output.
```python
from transformers import pipeline
classifier = pipeline("text-classification",model='Xuhui/ToxDect-roberta-large', return_all_scores=True)
prediction = classifier("You are f**king stupid!", )
print(prediction)
"""
Output:
[[{'label': 'LABEL_0', 'score': 0.002632011892274022}, {'label': 'LABEL_1', 'score': 0.9973680377006531}]]
"""
```
## Training procedure
The random seed for this model is 22. For other details, please refer to the Github [repo](https://github.com/XuhuiZhou/Toxic_Debias) for more details.
### BibTeX entry and citation info
```bibtex
@inproceedings{zhou-etal-2020-debiasing,
title = {Challenges in Automated Debiasing for Toxic Language Detection},
author = {Zhou, Xuhui and Sap, Maarten and Swayamdipta, Swabha and Choi, Yejin and Smith, Noah A.},
booktitle = {EACL},
abbr = {EACL},
html = {https://www.aclweb.org/anthology/2021.eacl-main.274.pdf},
code = {https://github.com/XuhuiZhou/Toxic_Debias},
year = {2021},
bibtex_show = {true},
selected = {true}
}
``` |