Views
No views yet
BSC-LT/mRoBERTa (trained from scratch/fine-tuned directly on this base)0: Ham (Legitimate)1: Phishing (Fraudulent)BSC-LT/mRoBERTa (not a warm start from previous Ana versions).</s></s> token.0.95 for Emails and 0.90 for SMS (a slightly lower threshold increases sensitivity for SMS, since the model was trained predominantly on email structures).</s></s>. El umbral recomendado es 0.95.1from transformers import pipeline
2
3classifier = pipeline("text-classification", model="Jmcc1976/Ana-FraudDetection-1.2", top_k=None)
4
5# 1. Definir asunto, cuerpo y el separador
6subject = "Urgente: Tu cuenta bancaria ha sido bloqueada"
7body = "Estimado cliente, por motivos de seguridad hemos bloqueado tu cuenta. Haz clic en el siguiente enlace para verificar tu identidad: http://phishing-banco.com/login"
8separator = " </s></s> "
9
10# 2. Concatenar
11email_text = f"{subject}{separator}{body}"
12
13# 3. Clasificar
14results = classifier(email_text)[0]
15phishing_prob = next(res['score'] for res in results if res['label'] == 'LABEL_1')
16
17# 4. Decisión basada en el umbral para Emails (0.95)
18THRESHOLD_EMAIL = 0.95
19is_phishing = phishing_prob >= THRESHOLD_EMAIL
20
21print(f"Probabilidad de Phishing: {phishing_prob:.4f}")
22print(f"¿Es Phishing? {is_phishing}")1from transformers import pipeline
2
3classifier = pipeline("text-classification", model="Jmcc1976/Ana-FraudDetection-1.2", top_k=None)
4
5# 1. Texto del SMS
6sms_text = "Correos: Tu paquete no se ha podido entregar por falta de franqueo. Paga 1,99 EUR aqui: http://correos-pagos-online.com"
7
8# 2. Clasificar
9results = classifier(sms_text)[0]
10phishing_prob = next(res['score'] for res in results if res['label'] == 'LABEL_1')
11
12# 3. Decisión basada en el umbral para SMS (0.90)
13THRESHOLD_SMS = 0.90
14is_phishing = phishing_prob >= THRESHOLD_SMS
15
16print(f"Probabilidad de Phishing: {phishing_prob:.4f}")
17print(f"¿Es Phishing? {is_phishing}")