Downloads · 30 days
8
13% of all-time downloads
pt-sk/bert-toxic-classification
bert-toxic-classification is a text classification model from pt-sk. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as afl-3.0.
This model is a fine-tuned version of the bert-base-uncased model to classify toxic comments.
Downloads · 30 days
8
13% of all-time downloads
All-time downloads
64
Public
Repo size
876 MB
Likes
0
Public
Click a slice to open those files.
.bin438 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of the bert-base-uncased model to classify toxic comments.
You can use the model with the following code.
from transformers import BertForSequenceClassification, BertTokenizer, TextClassificationPipeline
model_path = "pt-sk/bert-toxic-classification"
tokenizer = BertTokenizer.from_pretrained(model_path)
model = BertForSequenceClassification.from_pretrained(model_path, num_labels=2)
pipeline = TextClassificationPipeline(model=model, tokenizer=tokenizer)
print(pipeline("You're a fucking nerd."))
The training data comes from this Kaggle competition. We use 90% of the train.csv data to train the model.
The model achieves 0.95 AUC in a 1500 rows held-out test set.