AnkushWaghmare commited on
Commit
dc20fef
·
verified ·
1 Parent(s): 54f2080

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -37,15 +37,14 @@ def predict_sales():
37
 
38
  # Extract relevant customer features from the input data
39
  sample = {
40
- "Product_Sugar_Content": user_data["Product_Sugar_Content"], # e.g. "Low Sugar"
41
- "Product_Type": user_data["Product_Type"], # e.g. "Snack Foods"
42
- "Store_Id": user_data["Store_Id"], # e.g. "OUT002"
43
- "Store_Size": user_data["Store_Size"], # e.g. "Medium"
44
- "Store_Location_City_Type": user_data["Store_Location_City_Type"], # e.g. "Tier 2"
45
- "Store_Type": user_data["Store_Type"], # e.g. "Supermarket Type1"
46
- "Product_Weight": user_data["Product_Weight"], # numeric field
47
- "Product_Price": user_data["Product_Price"], # numeric field
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