Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-sa-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- hate-speech
|
| 5 |
+
- toxic-comments
|
| 6 |
+
- classification
|
| 7 |
+
- hatebert
|
| 8 |
+
- jigsaw
|
| 9 |
+
- fine-tuned
|
| 10 |
+
base_model: GroNLP/hateBERT
|
| 11 |
+
datasets:
|
| 12 |
+
- jigsaw-toxic-comment-classification-challenge
|
| 13 |
+
metrics:
|
| 14 |
+
- accuracy
|
| 15 |
+
- f1
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# HateBERT Fine-Tuned on Jigsaw Toxic Comments
|
| 19 |
+
|
| 20 |
+
This model is a fine-tuned version of [GroNLP/hateBERT](https://huggingface.co/GroNLP/hateBERT) on the [Jigsaw Toxic Comment Classification Challenge](https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge) dataset.
|
| 21 |
+
|
| 22 |
+
## How to Use
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 26 |
+
|
| 27 |
+
model = AutoModelForSequenceClassification.from_pretrained("Jensvollends/hatebert-finetuned")
|
| 28 |
+
tokenizer = AutoTokenizer.from_pretrained("Jensvollends/hatebert-finetuned")
|
| 29 |
+
|
| 30 |
+
inputs = tokenizer("You are a bad person", return_tensors="pt")
|
| 31 |
+
outputs = model(**inputs)
|