Downloads · 30 days
13
1% of all-time downloads
tensor-trek/distilbert-toxicity-classifier
distilbert-toxicity-classifier is a text classification model from tensor-trek. Use it when you need a label for a piece of text. It is set up for transformers.
This model is trained for toxicity classification task using. The dataset used for training is the dataset by Jigsaw ( Jigsaw 2020). We split it into two parts and fine-tune a DistilBERT model (DistilBERT base model (…
Downloads · 30 days
13
1% of all-time downloads
All-time downloads
2.1K
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.pt536 MB · 67%
From the Hugging Face model README
This model is trained for toxicity classification task using. The dataset used for training is the dataset by Jigsaw ( Jigsaw 2020). We split it into two parts and fine-tune a DistilBERT model (DistilBERT base model (uncased) ) on it. DistilBERT is a distilled version of the BERT base model. It was introduced in this paper.
from transformers import pipeline
text = "This was a masterpiece. Not completely faithful to the books, but enthralling from beginning to end. Might be my favorite of the three."
classifier = pipeline("text-classification", model="tensor-trek/distilbert-toxicity-classifier")
classifier(text)