Spaces:
Sleeping
Sleeping
Commit ·
1418093
1
Parent(s): 54daf5b
debug
Browse files
app.py
CHANGED
|
@@ -76,8 +76,8 @@ async def predict(features: PredictionFeatures):
|
|
| 76 |
# Prédiction
|
| 77 |
prediction = model.predict(information)
|
| 78 |
|
| 79 |
-
# Résultat
|
| 80 |
-
return {"prediction": prediction.tolist()[0]}
|
| 81 |
|
| 82 |
except Exception as e:
|
| 83 |
return {
|
|
@@ -87,6 +87,7 @@ async def predict(features: PredictionFeatures):
|
|
| 87 |
}
|
| 88 |
|
| 89 |
|
|
|
|
| 90 |
if __name__ == "__main__":
|
| 91 |
|
| 92 |
port = int(os.getenv("PORT", 7860))
|
|
|
|
| 76 |
# Prédiction
|
| 77 |
prediction = model.predict(information)
|
| 78 |
|
| 79 |
+
# Résultat arrondi à 2 décimales
|
| 80 |
+
return {"prediction": round(prediction.tolist()[0], 2)}
|
| 81 |
|
| 82 |
except Exception as e:
|
| 83 |
return {
|
|
|
|
| 87 |
}
|
| 88 |
|
| 89 |
|
| 90 |
+
|
| 91 |
if __name__ == "__main__":
|
| 92 |
|
| 93 |
port = int(os.getenv("PORT", 7860))
|