Download app.py from gdleds/retrain: direct link, hf CLI and curl.
- Browser
- Download file 411 Bytes
-
https://huggingface.co/spaces/gdleds/retrain/resolve/main/app.py
- Command line
-
hf download hf://spaces/gdleds/retrain/app.py
-
curl -L -o app.py https://huggingface.co/spaces/gdleds/retrain/resolve/main/app.py
411 Bytes
| from fastapi import FastAPI | |
| from retrain import run_retraining | |
| import requests | |
| app = FastAPI() | |
| def retrain(): | |
| result = run_retraining() | |
| requests.post("https://gdleds-api-fraud.hf.space/reload-model", timeout=120) | |
| return result | |
| def home(): | |
| return {"message" : "Bienvenue sur l'API de retrain du modèle XGBoost pour la prédiction de fraude de transaction"} |