Downloads · 30 days
0
Gemita284/safetalk-beto
safetalk-beto is a machine learning model from Gemita284. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- Modelo base: dccuchile/bert-base-spanish-wwm-cased (BETO) - Tarea: Clasificación binaria (ofensivo/no ofensivo) - F1-Score en TEST: 88.60% - Precisión: 89.61% - Recall: 87.62%
Downloads · 30 days
0
Access
Public
Updated May 17, 2026
Repo size
439 MB
Likes
0
Public
Click a slice to open those files.
.safetensors439 MB · 100%
From the Hugging Face model README
| Modelo | F1-Score | Mejora vs SVM | FN (Bullying perdido) | FP (Censura) |
|---|---|---|---|---|
| SVM | 84.36% | - | 104 (16.5%) | 91 (14.2%) |
| LightGBM | 84.86% | +0.50% | 103 (16.3%) | 82 (12.8%) |
| BETO | 88.60% | +4.24% | 78 (12.4%) | 64 (10.0%) |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Cargar modelo y tokenizer
tokenizer = AutoTokenizer.from_pretrained('./tokenizer')
model = AutoModelForSequenceClassification.from_pretrained('./modelo')
# Predecir
def predecir_texto(texto):
inputs = tokenizer(texto, return_tensors="pt", padding=True, truncation=True, max_length=128)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=1)
prediccion = torch.argmax(probs, dim=1).item()
confianza = probs[0][prediccion].item()
etiqueta = "Ofensivo" if prediccion == 1 else "No ofensivo"
return {
"texto": texto,
"prediccion": etiqueta,
"confianza": confianza
}
# Ejemplo
resultado = predecir_texto("eres un gilipollas")
print(resultado)
# {'texto': 'eres un gilipollas', 'prediccion': 'Ofensivo', 'confianza': 0.95}
modelo/ - Modelo BETO fine-tunedtokenizer/ - Tokenizer de BETOmetricas_beto.json - Métricas completas del modeloREADME.md - Este archivoEntrenado: 2026-05-10