ai-redes-rubertuito / README.md
Carlos Ojeda
initial FastAPI Robertuito space
2391f1d
|
Raw
History Blame Contribute Delete
856 Bytes
metadata
title: RoBERTuito Comment Classifier
sdk: docker
app_port: 7860
pinned: false

RoBERTuito Comment Classifier

FastAPI service for classifying Facebook comments into:

  • hater
  • critico
  • neutral

The service uses one model, pysentimiento/robertuito-hate-speech, to keep memory usage low on Hugging Face Spaces. The critico label is an intermediate risk band based on configurable HS/TR/AG thresholds.

Endpoints

  • GET /health
  • POST /classify
  • POST /classify/batch

Protected endpoints require:

X-API-Key: your-key

Local Run

pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 7860

Example

curl -X POST http://localhost:7860/classify \
  -H "Content-Type: application/json" \
  -H "X-API-Key: change-me" \
  -d '{"text":"Este comentario es una prueba"}'