Exqrch commited on
Commit
b87dceb
1 Parent(s): 42a0fdb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -3
README.md CHANGED
@@ -1,3 +1,65 @@
1
- ---
2
- license: cc-by-sa-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ ---
4
+ # IndoBERTweet-SexuallyExplicit
5
+
6
+ ## Model Description
7
+ IndoBERTweet fine-tuned on IndoToxic2024 dataset, with an accuracy of 0.91 and macro-F1 of 0.80. Performances are obtained through stratified 10-fold cross-validation.
8
+
9
+ ## Supported Tokenizer
10
+ - **indolem/indobertweet-base-uncased**
11
+
12
+ ## Example Code
13
+ ```python
14
+ import torch
15
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
16
+
17
+ # Specify the model and tokenizer name
18
+ model_name = "Exqrch/IndoBERTweet-SexuallyExplicit"
19
+ tokenizer_name = "indolem/indobertweet-base-uncased"
20
+
21
+ # Load the pre-trained model
22
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
23
+
24
+ # Load the tokenizer
25
+ tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)
26
+
27
+ text = "selamat pagi semua!"
28
+
29
+ output = model(**tokenizer(text, return_tensors="pt"))
30
+ logits = output.logits
31
+
32
+ # Get the predicted class label
33
+ predicted_class = torch.argmax(logits, dim=-1).item()
34
+
35
+ print(predicted_class)
36
+ --- Output ---
37
+ > 0
38
+ --- End of Output ---
39
+ ```
40
+
41
+ ## Limitations
42
+ Trained only on Indonesian texts. No information on code-switched text performance.
43
+
44
+ ## Sample Output
45
+ ```
46
+ Model name: Exqrch/IndoBERTweet-SexuallyExplicit
47
+ Text 1: billiard engak ntar bro?
48
+ Prediction: 0
49
+ Text 2: eh kerumah ku yok main bareng di ranjang
50
+ Prediction: 1
51
+ ```
52
+
53
+ ## Citation
54
+ If used, please cite:
55
+ ```
56
+ @article{susanto2024indotoxic2024,
57
+ title={IndoToxic2024: A Demographically-Enriched Dataset of Hate Speech and Toxicity Types for Indonesian Language},
58
+ author={Lucky Susanto and Musa Izzanardi Wijanarko and Prasetia Anugrah Pratama and Traci Hong and Ika Idris and Alham Fikri Aji and Derry Wijaya},
59
+ year={2024},
60
+ eprint={2406.19349},
61
+ archivePrefix={arXiv},
62
+ primaryClass={cs.CL},
63
+ url={https://arxiv.org/abs/2406.19349},
64
+ }
65
+ ```