singhina commited on
Commit
94edc3d
·
1 Parent(s): f5b389e

Deploy SuperKart Streamlit UI

Browse files
Files changed (1) hide show
  1. streamlit_app.py +3 -3
streamlit_app.py CHANGED
@@ -29,7 +29,7 @@ with st.form("forecast_form"):
29
  prefix = st.text_input("Product Prefix", "FD")
30
  pnum = st.number_input("Product Numeric ID", 0, 100000, 6114, 1)
31
  age = st.number_input("Store Age (yrs)", 0, 50, int(pd.Timestamp.now().year - year), 1)
32
- submitted = st.form_submit_button("🔮 Predict")
33
 
34
  if submitted:
35
  payload = {"data": [{
@@ -48,6 +48,6 @@ if submitted:
48
  resp = requests.post(f"{BACKEND_URL}/predict", json=payload, timeout=10)
49
  resp.raise_for_status()
50
  pred = resp.json()["predictions"][0]
51
- st.success(f"🚀 Forecasted Sales: ₹{pred:,.2f}")
52
  except Exception as e:
53
- st.error(f" Prediction error: {e}")
 
29
  prefix = st.text_input("Product Prefix", "FD")
30
  pnum = st.number_input("Product Numeric ID", 0, 100000, 6114, 1)
31
  age = st.number_input("Store Age (yrs)", 0, 50, int(pd.Timestamp.now().year - year), 1)
32
+ submitted = st.form_submit_button(" Predict")
33
 
34
  if submitted:
35
  payload = {"data": [{
 
48
  resp = requests.post(f"{BACKEND_URL}/predict", json=payload, timeout=10)
49
  resp.raise_for_status()
50
  pred = resp.json()["predictions"][0]
51
+ st.success(f" Forecasted Sales: ₹{pred:,.2f}")
52
  except Exception as e:
53
+ st.error(f" Prediction error: {e}")