Downloads · 30 days
7
7% of all-time downloads
sana-ngu/BERTweet-large-sexism-detector
BERTweet-large-sexism-detector is a text classification model from sana-ngu. Use it when you need a label for a piece of text. It is set up for transformers.
This is a fine-tuned model of BERTweet-large on the Explainable Detection of Online Sexism (EDOS) dataset. It is intended to be used as a classification model for identifying tweets (0 - not sexist; 1 - sexist).
Downloads · 30 days
7
7% of all-time downloads
All-time downloads
96
Public
Repo size
2.8 GB
Likes
2
Public
Click a slice to open those files.
.bin1.4 GB · 100%
From the Hugging Face model README
This is a fine-tuned model of BERTweet-large on the Explainable Detection of Online Sexism (EDOS) dataset. It is intended to be used as a classification model for identifying tweets (0 - not sexist; 1 - sexist).
More information about the original pre-trained model can be found here
Classification examples:
| Prediction | Tweet |
|---|---|
| sexist | Every woman wants to be a model. It's codeword for "I get everything for free and people want me" |
| not sexist | basically I placed more value on her than I should then? |
For more details about the datasets and eval results, see (we will updated the page with our paper link)
from transformers import AutoModelForSequenceClassification, AutoTokenizer,pipeline
import torch
model = AutoModelForSequenceClassification.from_pretrained('sana-ngu/BERTweet-large-sexism-detector')
tokenizer = AutoTokenizer.from_pretrained('vinai/bertweet-large')
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
prediction=classifier("Every woman wants to be a model. It's codeword for 'I get everything for free and people want me' ")
label_pred = 'not sexist' if prediction == 0 else 'sexist'
print(label_pred)