AnnyNguyen commited on
Commit
c79273b
verified
1 Parent(s): f952ce6

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: vi
3
+ tags:
4
+ - spam-detection
5
+ - vietnamese
6
+ - bartpho
7
+ license: apache-2.0
8
+ datasets:
9
+ - visolex/ViSpamReviews
10
+ metrics:
11
+ - accuracy
12
+ - f1
13
+ model-index:
14
+ - name: bartpho-spam-binary
15
+ results:
16
+ - task:
17
+ type: text-classification
18
+ name: Spam Detection (Binary)
19
+ dataset:
20
+ name: ViSpamReviews
21
+ type: custom
22
+ metrics:
23
+ - name: Accuracy
24
+ type: accuracy
25
+ value: <INSERT_ACCURACY>
26
+ - name: F1 Score
27
+ type: f1
28
+ value: <INSERT_F1_SCORE>
29
+ base_model:
30
+ - vinai/bartpho-syllable
31
+ pipeline_tag: text-classification
32
+ ---
33
+
34
+ # BARTPho-Spam-Binary
35
+
36
+ Fine-tuned from [`vinai/bartpho-syllable`](https://huggingface.co/vinai/bartpho-syllable) on **ViSpamReviews** (binary).
37
+
38
+ * **Task**: Binary classification
39
+ * **Dataset**: [ViSpamReviews](https://huggingface.co/datasets/visolex/ViSpamReviews)
40
+ * **Hyperparameters**
41
+
42
+ * Batch size: 32
43
+ * LR: 3e-5
44
+ * Epochs: 100
45
+ * Max seq len: 256
46
+ ## Usage
47
+
48
+ ```python
49
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
50
+
51
+ tokenizer = AutoTokenizer.from_pretrained("visolex/bartpho-spam-binary")
52
+ model = AutoModelForSequenceClassification.from_pretrained("visolex/bartpho-spam-binary")
53
+
54
+ text = "Review n脿y kh么ng c贸 th岷璽."
55
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
56
+ pred = model(**inputs).logits.argmax(dim=-1).item()
57
+ print("Spam" if pred==1 else "Non-spam")
58
+ ```