Downloads · 30 days
10
9% of all-time downloads
Ricardouchub/xlmr-sentiment-es-en
xlmr-sentiment-es-en is a machine learning model from Ricardouchub. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Clasificador binario (Positive/Negative) para reseñas de películas en inglés y español, fine-tuned desde xlm-roberta-base con Rotten Tomatoes movies and critic reviews dataset from Kaggle
Downloads · 30 days
10
9% of all-time downloads
All-time downloads
116
Public
Parameters
278M
2.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
Clasificador binario (Positive/Negative) para reseñas de películas en inglés y español, fine-tuned desde xlm-roberta-base con Rotten Tomatoes movies and critic reviews dataset from Kaggle
Métricas:
Acc 0.8519 · F1 0.8876 · Prec 0.8646 · Rec 0.9119 · AUC 0.9260
Umbral recomendado:* *0.48
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
m = "Ricardouchub/xlmr-sentiment-es-en"; thr = 0.48
tok = AutoTokenizer.from_pretrained(m, use_fast=True)
mdl = AutoModelForSequenceClassification.from_pretrained(m).eval()
enc = tok(["Excelente actuación, final predecible."], truncation=True, max_length=224, padding=True, return_tensors="pt")
p = torch.softmax(mdl(**enc).logits, dim=-1)[:,1].item()
print(("POSITIVE" if p>=thr else "NEGATIVE"), round(p*100,1), "%")
Notas: split por película (evita fuga); limpieza mínima de texto. No apto para usos sensibles.
Autor: Ricardo Urdaneta