Parthi07 commited on
Commit
d73e1c4
·
verified ·
1 Parent(s): 304a464

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,6 +9,7 @@ st.header("SuperKart Product Sales Prediction")
9
  st.subheader("Online Product Sales Prediction")
10
 
11
  # Collect user input for product and store features
 
12
  Product_Weight=st.number_input("Product Weight")
13
  Product_Sugar_Content=st.selectbox("Product Sugar Content",["Low Sugar","Medium Sugar","High Sugar"])
14
  Product_Allocated_Area=st.number_input("Product Allocated Area")
@@ -42,7 +43,7 @@ if st.button("Predict"):
42
  response = requests.post("https://Parthi07-SuperKartProductPricePrediction.hf.space/v1/sales", json=input_data.to_dict(orient='records')[0])
43
  if response.status_code == 200:
44
  prediction = response.json()['Predicted Product Sales Price']
45
- st.success(f"Predicted Product Sales Price: {prediction}")
46
  else:
47
  st.error(f"Error making prediction: {response.status_code}")
48
 
 
9
  st.subheader("Online Product Sales Prediction")
10
 
11
  # Collect user input for product and store features
12
+ Product_Id=st.text_input("Product Id")
13
  Product_Weight=st.number_input("Product Weight")
14
  Product_Sugar_Content=st.selectbox("Product Sugar Content",["Low Sugar","Medium Sugar","High Sugar"])
15
  Product_Allocated_Area=st.number_input("Product Allocated Area")
 
43
  response = requests.post("https://Parthi07-SuperKartProductPricePrediction.hf.space/v1/sales", json=input_data.to_dict(orient='records')[0])
44
  if response.status_code == 200:
45
  prediction = response.json()['Predicted Product Sales Price']
46
+ st.success(f"Product Sales for Product ID {Product_Id} is {prediction:,.2f}")
47
  else:
48
  st.error(f"Error making prediction: {response.status_code}")
49