AnnyNguyen's picture
Update README.md
34f6d67 verified
metadata
language: vi
tags:
  - spam-detection
  - vietnamese
  - transformer
license: apache-2.0
datasets:
  - visolex/ViSpamReviews
metrics:
  - accuracy
  - f1
model-index:
  - name: visobert-spam-binary
    results:
      - task:
          type: text-classification
          name: Spam Detection (Binary)
        dataset:
          name: ViSpamReviews
          type: custom
        metrics:
          - name: Accuracy
            type: accuracy
            value: <INSERT_ACCURACY>
          - name: F1 Score
            type: f1
            value: <INSERT_F1_SCORE>
base_model:
  - uitnlp/visobert
pipeline_tag: text-classification

ViSoBERT-Spam-Binary

Fine-tuned from uitnlp/visobert on ViSpamReviews for binary spam detection.

  • Task: Binary classification (Label: 0 = non-spam, 1 = spam)

  • Dataset: ViSpamReviews

  • Hyperparameters

    • Batch size: 32
    • LR: 3e-5
    • Epochs: 100
    • Max seq len: 256

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("visolex/visobert-spam-binary")
model = AutoModelForSequenceClassification.from_pretrained("visolex/visobert-spam-binary")

text = "Đây là đánh giá tuyệt vời!"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
pred = model(**inputs).logits.argmax(dim=-1).item()
print("Spam" if pred==1 else "Non-spam")