Spaces:
Running
Running
GitLab CI commited on
Commit ·
f430cd2
1
Parent(s): 2edd2e3
Déploiement automatique depuis GitLab CI - 2026-02-21 15:10:29
Browse files
api.py
CHANGED
|
@@ -258,7 +258,7 @@ def predict(input_data: PredictionInput):
|
|
| 258 |
|
| 259 |
#Vérifier que les features importantes sont présentes dans les données d'entrée sinon lever une exception
|
| 260 |
missing_important_features = [feat for feat in important_features if feat not in input_data.features]
|
| 261 |
-
if missing_important_features:
|
| 262 |
logger.error("Features importantes manquantes: " + ", ".join(missing_important_features))
|
| 263 |
raise HTTPException(
|
| 264 |
status_code=400,
|
|
|
|
| 258 |
|
| 259 |
#Vérifier que les features importantes sont présentes dans les données d'entrée sinon lever une exception
|
| 260 |
missing_important_features = [feat for feat in important_features if feat not in input_data.features]
|
| 261 |
+
if len(missing_important_features) > 0:
|
| 262 |
logger.error("Features importantes manquantes: " + ", ".join(missing_important_features))
|
| 263 |
raise HTTPException(
|
| 264 |
status_code=400,
|