Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -12,8 +12,7 @@ def home():
|
|
| 12 |
return "Welcome to the SuperKart Sales Prediction API"
|
| 13 |
|
| 14 |
|
| 15 |
-
@app.post('
|
| 16 |
-
#'/v1/sales')
|
| 17 |
def predict_sales():
|
| 18 |
|
| 19 |
sales_data = request.get_json()
|
|
@@ -33,7 +32,7 @@ def predict_sales():
|
|
| 33 |
|
| 34 |
input_data = pd.DataFrame([sample])
|
| 35 |
|
| 36 |
-
prediction = model.predict(input_data).tolist[0]
|
| 37 |
|
| 38 |
return jsonify({"Predicted Sales": prediction})
|
| 39 |
|
|
|
|
| 12 |
return "Welcome to the SuperKart Sales Prediction API"
|
| 13 |
|
| 14 |
|
| 15 |
+
@app.post('/v1/sales')
|
|
|
|
| 16 |
def predict_sales():
|
| 17 |
|
| 18 |
sales_data = request.get_json()
|
|
|
|
| 32 |
|
| 33 |
input_data = pd.DataFrame([sample])
|
| 34 |
|
| 35 |
+
prediction = model.predict(input_data).tolist()[0]
|
| 36 |
|
| 37 |
return jsonify({"Predicted Sales": prediction})
|
| 38 |
|