Update app.py
Browse files
app.py
CHANGED
|
@@ -32,6 +32,11 @@ class InputModel(BaseModel):
|
|
| 32 |
class OutputModel(BaseModel):
|
| 33 |
prediction: float = Field(..., example=224800, description="Prédiction de la consommation de gaz naturel")
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
# Define predict function
|
| 36 |
@app.post("/predict", response_model=OutputModel, summary="Prédire la Consommation de Gaz Naturel", description="Prédit la consommation de gaz naturel basée sur les paramètres fournis.")
|
| 37 |
def predict(data: InputModel):
|
|
|
|
| 32 |
class OutputModel(BaseModel):
|
| 33 |
prediction: float = Field(..., example=224800, description="Prédiction de la consommation de gaz naturel")
|
| 34 |
|
| 35 |
+
|
| 36 |
+
@app.get("/", include_in_schema=False)
|
| 37 |
+
def root():
|
| 38 |
+
return RedirectResponse(url="/docs")
|
| 39 |
+
|
| 40 |
# Define predict function
|
| 41 |
@app.post("/predict", response_model=OutputModel, summary="Prédire la Consommation de Gaz Naturel", description="Prédit la consommation de gaz naturel basée sur les paramètres fournis.")
|
| 42 |
def predict(data: InputModel):
|