sana-ngu commited on
Commit
b5e83ad
1 Parent(s): 11e31b1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -0
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ metrics:
5
+ - f1
6
+ - accuracy
7
+ pipeline_tag: text-classification
8
+ ---
9
+ ### distilbert-base-sexism-detector
10
+ This is a fine-tuned model of distilbert-base 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).
11
+
12
+ **This is a light model with an 81.2 F1 score. Use this model for fase prediction using the online API, if you like to see our best model with 86.3 F1 score , use this [link](https://huggingface.co/NLP-LTU/BERTweet-large-sexism-detector).**
13
+
14
+ Classification examples (use these example in the Hosted Inference API in the right panel ):
15
+
16
+ |Prediction|Tweet|
17
+ |-----|--------|
18
+ |sexist |Every woman wants to be a model. It's codeword for "I get everything for free and people want me" |
19
+ |not sexist |basically I placed more value on her than I should then?|
20
+ # More Details
21
+ For more details about the datasets and eval results, see (we will updated the page with our paper link)
22
+ # How to use
23
+ ```python
24
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer,pipeline
25
+ import torch
26
+ model = AutoModelForSequenceClassification.from_pretrained('NLP-LTU/distilbert-sexism-detector')
27
+ tokenizer = AutoTokenizer.from_pretrained('distilbert-base-uncased')
28
+ classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
29
+ prediction=classifier("Every woman wants to be a model. It's codeword for 'I get everything for free and people want me' ")
30
+ label_pred = 'not sexist' if prediction == 0 else 'sexist'
31
+
32
+ print(label_pred)
33
+
34
+ ```
35
+ ```
36
+ precision recall f1-score support
37
+
38
+ not sexsit 0.9000 0.9264 0.9130 3030
39
+ sexist 0.7469 0.6784 0.7110 970
40
+
41
+ accuracy 0.8662 4000
42
+ macro avg 0.8234 0.8024 0.8120 4000
43
+ weighted avg 0.8628 0.8662 0.8640 4000
44
+
45
+ ```