licorne2lc commited on
Commit
35aad6d
·
1 Parent(s): 5a3a9a3
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -61,8 +61,11 @@ class PredictionFeatures(BaseModel):
61
  winter_tires: bool = True
62
 
63
  @app.get("/", tags=["Simple Endpoint"])
64
- async def index():
65
- return {"message": "bienvenue sur l'api GET Around! auteur---> Jerome Moulinier"}
 
 
 
66
 
67
  @app.post("/predict", tags=["Prediction"])
68
  async def predict(features: PredictionFeatures):
@@ -70,7 +73,7 @@ async def predict(features: PredictionFeatures):
70
  information = pd.DataFrame(features.dict(), index=[0])
71
 
72
  # Load model
73
- model = load('model.joblib')
74
 
75
  # Make prediction
76
  prediction = model.predict(information)
 
61
  winter_tires: bool = True
62
 
63
  @app.get("/", tags=["Simple Endpoint"])
64
+ def index():
65
+ return {
66
+ "message": "Bienvenue sur l'API GET Around! auteur —> Jerome Moulinier",
67
+ "model_status": model_status
68
+ }
69
 
70
  @app.post("/predict", tags=["Prediction"])
71
  async def predict(features: PredictionFeatures):
 
73
  information = pd.DataFrame(features.dict(), index=[0])
74
 
75
  # Load model
76
+ model = model
77
 
78
  # Make prediction
79
  prediction = model.predict(information)