Views
No views yet
normal, promo, smish[LINK]; duplicates removed; stratified train/val/test splitThe raw dataset is not publicly released for privacy reasons. Some synthetic smish examples were included to balance classes.
promo and smish in link-heavy texts.1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch.nn.functional as F
3import torch
4
5model_id = "squadgoals404/XLM-Prohori-v2"
6tok = AutoTokenizer.from_pretrained(model_id)
7mdl = AutoModelForSequenceClassification.from_pretrained(model_id)
8
9# Force semantic class names in-memory
10CLASS_NAMES = ["normal", "promo", "smish"] # make sure the order matches 0,1,2
11mdl.config.id2label = {i: c for i, c in enumerate(CLASS_NAMES)}
12mdl.config.label2id = {c: i for i, c in enumerate(CLASS_NAMES)}
13
14text = "Bank Account temporarily locked—identity verify করতে জরুরি কল 017XX-XXXXXX"
15inputs = tok(text, return_tensors="pt")
16with torch.no_grad():
17 probs = F.softmax(mdl(**inputs).logits, dim=-1).squeeze().tolist()
18
19print({CLASS_NAMES[i]: round(p, 4) for i, p in enumerate(probs)})