Spaces:
Sleeping
Sleeping
| title: Bank Fraud Detection API | |
| emoji: π¦ | |
| colorFrom: red | |
| colorTo: yellow | |
| sdk: docker | |
| pinned: false | |
| # π¦ Bank Fraud Detection API | |
| A FastAPI-based fraud detection API powered by `austinb/fraud_text_detection` (DistilBERT). | |
| ## Endpoints | |
| | Method | Endpoint | Description | | |
| |--------|----------|-------------| | |
| | GET | `/health` | Health check | | |
| | POST | `/predict` | Single fraud risk score + risk level | | |
| | POST | `/predict/batch` | Batch predictions | | |
| | POST | `/analyze` | Full analysis β score + risk + binary detection | | |
| ## Example Usage | |
| ```bash | |
| curl -X POST https://YOUR-SPACE-URL/analyze \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"text": "User transferred 50000 to an unknown account at midnight"}' | |
| ``` | |
| ## Response | |
| ```json | |
| { | |
| "text": "User transferred 50000 to an unknown account at midnight", | |
| "fraud_score": 0.923, | |
| "risk_level": "High Risk π¨", | |
| "is_fraud": true, | |
| "detection": "Fraud Detected π¨" | |
| } | |
| ``` |