Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def predict_sales():
|
|
| 40 |
prediction = model.predict(input_data).tolist()[0]
|
| 41 |
|
| 42 |
# Return the prediction as a JSON response
|
| 43 |
-
return jsonify({'Prediction': {"Product_Id": Product_Id, "Sales": prediction}})
|
| 44 |
|
| 45 |
# Define an endpoint to predict sales for a batch of products
|
| 46 |
@sales_prediction_api.post('/v1/productbatch')
|
|
|
|
| 40 |
prediction = model.predict(input_data).tolist()[0]
|
| 41 |
|
| 42 |
# Return the prediction as a JSON response
|
| 43 |
+
return jsonify({'Prediction': {"Product_Id": product_data['Product_Id'], "Sales": prediction}})
|
| 44 |
|
| 45 |
# Define an endpoint to predict sales for a batch of products
|
| 46 |
@sales_prediction_api.post('/v1/productbatch')
|