Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def home():
|
|
| 15 |
return "Welcome to the Superkart Sales Forecasting API!"
|
| 16 |
|
| 17 |
# Define an endpoint to predict churn for a single customer
|
| 18 |
-
@superkart_api.post('v1/sales')
|
| 19 |
def predict_sales():
|
| 20 |
# Get JSON data from the request
|
| 21 |
data = request.get_json()
|
|
@@ -43,8 +43,7 @@ def predict_sales():
|
|
| 43 |
return jsonify({'Predicted_Sales': prediction})
|
| 44 |
|
| 45 |
|
| 46 |
-
|
| 47 |
-
@superkart_api.post('v1/salesbatch')
|
| 48 |
def predict_sales_batch():
|
| 49 |
# Get the uploaded CSV file from the request
|
| 50 |
file = request.files['file']
|
|
|
|
| 15 |
return "Welcome to the Superkart Sales Forecasting API!"
|
| 16 |
|
| 17 |
# Define an endpoint to predict churn for a single customer
|
| 18 |
+
@superkart_api.post('/v1/sales')
|
| 19 |
def predict_sales():
|
| 20 |
# Get JSON data from the request
|
| 21 |
data = request.get_json()
|
|
|
|
| 43 |
return jsonify({'Predicted_Sales': prediction})
|
| 44 |
|
| 45 |
|
| 46 |
+
@superkart_api.post('/v1/salesbatch')
|
|
|
|
| 47 |
def predict_sales_batch():
|
| 48 |
# Get the uploaded CSV file from the request
|
| 49 |
file = request.files['file']
|