Spaces:
Sleeping
Sleeping
Commit History
-
Upload folder using huggingface_hub
Verified signaturee406ddb
-
Upload folder using huggingface_hub
Verified signature100ddbe
-
feat: add FastAPI REST API with HR churn prediction endpoint
- Create app/main.py with FastAPI app and lifespan model loading - Add Pydantic schemas for input validation (24 fields) and structured output (prediction, label, probabilite) - Implement /health, /model/info and /predict endpoints - Add ml_model/loader.py to load pipeline and custom threshold from pkl - Apply feature engineering before inference: derive stabilite_management, flag_surcharge_et_deplacement, ratio_promotion_anciennete, satisfaction_globale, satisfaction_min, log_revenu; drop 3 raw columns - Classify with custom threshold (predict_proba >= threshold) - Update requirements.txt with fastapi, uvicorn, scikit-learn, pandase59e621