File size: 2,072 Bytes
a3ec1cb 317bf57 a3ec1cb 317bf57 49de308 72788ff 317bf57 6bef03f 317bf57 6bef03f 317bf57 |
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 |
---
language:
- en
metrics:
- accuracy
- f1
widget:
- text: >-
Every woman wants to be a model. It's codeword for 'I get everything for
free and people want me'
pipeline_tag: text-classification
---
### BERTweet-large-sexism-detector
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](https://huggingface.co/docs/transformers/model_doc/bertweet)
Our model accuracy was 89.72 using the test set and 86.13 F1-score.
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?|
# More Details
For more details about the datasets and eval results, see (we will updated the page with our paper link)
# How to use
```python
from transformers import AutoModelForSequenceClassification, AutoTokenizer,pipeline
import torch
model = AutoModelForSequenceClassification.from_pretrained('NLP-LTU/bertweet-large-sexism-detector')
tokenizer = AutoTokenizer.from_pretrained('NLP-LTU/bertweet-large-sexism-detector')
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(prediction)
```
our system rank 10 out of 84 teams, and our results on the test set was:
```
precision recall f1-score support
not sexsit 0.9355 0.9284 0.9319 3030
sexist 0.7815 0.8000 0.7906 970
accuracy 0.8972 4000
macro avg 0.8585 0.8642 0.8613 4000
weighted avg 0.8981 0.8972 0.8977 4000
```
tn 2813, fp 217, fn 194, tp 776``` |