--- title: Nigerian Transaction Classifier API emoji: 🏦 colorFrom: green colorTo: gray sdk: docker app_port: 7860 pinned: false --- # Nigerian Transaction Classifier API Serves `killykilly/nigerian-transaction-classifier` (DistilBERT) over a plain HTTP API for the finance-analyzer backend, since the model is not available through HF serverless Inference Providers. The model is downloaded from the Hub at container startup, so pushing retrained weights to the model repo and restarting this Space is all that is needed to upgrade. ## API - `GET /health` → `{"status": "ok", "model": "..."}` - `POST /classify` with `{"texts": ["debit | uber trip lagos", ...]}` → `{"predictions": [{"label": "Transport", "score": 0.97}, ...]}` (one prediction per input, same order)