Spaces:
Sleeping
Sleeping
metadata
title: Fraud Detection API
emoji: 🛡️
colorFrom: red
colorTo: blue
sdk: docker
pinned: false
license: mit
🛡️ API de Détection de Fraude
API de détection de fraude dans les transactions bancaires utilisant un modèle Random Forest.
🚀 Utilisation
Endpoint principal: /predict
curl -X POST "https://votre-space.hf.space/predict" \
-H "Content-Type: application/json" \
-d '{
"amt": 125.50,
"category": "personal_care",
"merchant": "fraud_Kirlin and Sons",
"trans_date_trans_time": "2020-06-21 12:14:25",
"gender": "M",
"state": "SC",
"lat": 33.9659,
"long": -80.9355,
"city_pop": 333497,
"dob": "1968-03-19",
"merch_lat": 33.986391,
"merch_long": -81.200714
}'
Réponse
{
"is_fraud": false,
"fraud_probability": 0.23,
"risk_level": "Faible",
"details": {
"montant": 125.50,
"categorie": "personal_care",
"heure": 12,
"age_client": 52,
"distance_km": 25.4
}
}
📊 Endpoints disponibles
GET /- Informations sur l'APIGET /health- État de santéGET /categories- Liste des catégories validesPOST /predict- Prédiction de fraudeGET /docs- Documentation interactive (Swagger)
🔧 Modèle
- Algorithme: Random Forest Classifier
- Features: 16 caractéristiques (montant, heure, distance, historique client...)
- Performance: AUC-ROC > 0.95
📝 Licence
MIT