Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ def home():
|
|
| 14 |
return "Welcome to the Sales Revenue Prediction API!"
|
| 15 |
|
| 16 |
# Define an endpoint to predict churn for a single customer
|
| 17 |
-
@SalesRevenue_predictor_api.
|
| 18 |
def predict_revenue():
|
| 19 |
# Get JSON data from the request
|
| 20 |
product_data = request.get_json()
|
|
@@ -28,7 +28,7 @@ def predict_revenue():
|
|
| 28 |
'Product_MRP': product_data['Product_MRP'],
|
| 29 |
'Store_Id': product_data['Store_Id'],
|
| 30 |
'Store_Establishment_Year': product_data['Store_Establishment_Year'],
|
| 31 |
-
'Store_Size
|
| 32 |
'Store_Location_City_Type': product_data['Store_Location_City_Type'],
|
| 33 |
'Store_Type' : product_data['Store_Type']
|
| 34 |
}
|
|
|
|
| 14 |
return "Welcome to the Sales Revenue Prediction API!"
|
| 15 |
|
| 16 |
# Define an endpoint to predict churn for a single customer
|
| 17 |
+
@SalesRevenue_predictor_api.route('/v1/Sales_prediction', methods=['POST'])
|
| 18 |
def predict_revenue():
|
| 19 |
# Get JSON data from the request
|
| 20 |
product_data = request.get_json()
|
|
|
|
| 28 |
'Product_MRP': product_data['Product_MRP'],
|
| 29 |
'Store_Id': product_data['Store_Id'],
|
| 30 |
'Store_Establishment_Year': product_data['Store_Establishment_Year'],
|
| 31 |
+
'Store_Size': product_data['Store_Size'],
|
| 32 |
'Store_Location_City_Type': product_data['Store_Location_City_Type'],
|
| 33 |
'Store_Type' : product_data['Store_Type']
|
| 34 |
}
|