Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -10,11 +10,11 @@ model = joblib.load("deployment_files/superkart_sales_forecast_model_v1_0.joblib
|
|
| 10 |
def home():
|
| 11 |
return "SuperKart Sales Forecasting API is alive"
|
| 12 |
|
| 13 |
-
#
|
| 14 |
@superkart_sales_api.post("/v1/sales")
|
| 15 |
def predict_sales():
|
| 16 |
data = request.get_json()
|
| 17 |
-
|
| 18 |
sample = {
|
| 19 |
"Product_Weight": data["Product_Weight"],
|
| 20 |
"Product_Sugar_Content": data["Product_Sugar_Content"],
|
|
|
|
| 10 |
def home():
|
| 11 |
return "SuperKart Sales Forecasting API is alive"
|
| 12 |
|
| 13 |
+
# API endpoint to match the frontend call
|
| 14 |
@superkart_sales_api.post("/v1/sales")
|
| 15 |
def predict_sales():
|
| 16 |
data = request.get_json()
|
| 17 |
+
|
| 18 |
sample = {
|
| 19 |
"Product_Weight": data["Product_Weight"],
|
| 20 |
"Product_Sugar_Content": data["Product_Sugar_Content"],
|