Fraud-API / README.md
VishalBhagat01's picture
Upload 6 files
20cbff3 verified
metadata
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

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

{
  "text": "User transferred 50000 to an unknown account at midnight",
  "fraud_score": 0.923,
  "risk_level": "High Risk 🚨",
  "is_fraud": true,
  "detection": "Fraud Detected 🚨"
}