Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,15 +37,14 @@ def predict_sales():
|
|
| 37 |
|
| 38 |
# Extract relevant customer features from the input data
|
| 39 |
sample = {
|
| 40 |
-
"
|
| 41 |
-
"
|
| 42 |
-
"
|
| 43 |
-
"
|
| 44 |
-
"
|
| 45 |
-
"
|
| 46 |
-
"
|
| 47 |
-
"
|
| 48 |
-
"Store_Area": user_data["Store_Area"], # numeric field
|
| 49 |
}
|
| 50 |
|
| 51 |
# Convert to DataFrame and apply mapping
|
|
|
|
| 37 |
|
| 38 |
# Extract relevant customer features from the input data
|
| 39 |
sample = {
|
| 40 |
+
"Product_Weight": user_data["Product_Weight"],
|
| 41 |
+
"Product_Sugar_Content": user_data["Product_Sugar_Content"],
|
| 42 |
+
"Product_Allocated_Area": user_data["Product_Allocated_Area"],
|
| 43 |
+
"Product_Type": user_data["Product_Type"],
|
| 44 |
+
"Product_MRP": user_data["Product_MRP"],
|
| 45 |
+
"Store_Size": user_data["Store_Size"],
|
| 46 |
+
"Product_Store_Sales_Total": user_data.get("Product_Store_Sales_Total", 0),
|
| 47 |
+
"Store_Age": user_data.get("Store_Age", 10)
|
|
|
|
| 48 |
}
|
| 49 |
|
| 50 |
# Convert to DataFrame and apply mapping
|