avraux
commited on
Commit
·
f35d21e
1
Parent(s):
45b695f
/ message
Browse files
app.py
CHANGED
@@ -17,6 +17,11 @@ class InputData(BaseModel):
|
|
17 |
carrosserie: str
|
18 |
gamme: str
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
# Endpoint pour prédiction
|
21 |
@app.post("/predict")
|
22 |
def predict(data: InputData):
|
|
|
17 |
carrosserie: str
|
18 |
gamme: str
|
19 |
|
20 |
+
@app.get("/")
|
21 |
+
def read_root():
|
22 |
+
return {"message": "Welcome to CO2 Prediction for cars ! \nTo use the prediction endpoint, it's a POST request to /predict. You can see what the body should look like in the README !"}
|
23 |
+
|
24 |
+
|
25 |
# Endpoint pour prédiction
|
26 |
@app.post("/predict")
|
27 |
def predict(data: InputData):
|