Lokiiparihar commited on
Commit
369beb7
Β·
verified Β·
1 Parent(s): 956a8f9

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -2
src/streamlit_app.py CHANGED
@@ -59,7 +59,7 @@ if st.button("Predict Sales"):
59
  st.subheader("πŸ” Raw Backend Response")
60
  st.json(result) # SHOW FULL JSON RETURNED
61
 
62
- prediction = result.get("prediction", None)
63
  except ValueError:
64
  prediction = response.text
65
  st.warning("⚠ Backend did not return JSON, showing raw text:")
@@ -67,7 +67,7 @@ if st.button("Predict Sales"):
67
 
68
  try:
69
  prediction = float(prediction)
70
- st.success(f"βœ… Predicted Sales: **{Predicted_Sales:.2f} units**")
71
  except (ValueError, TypeError):
72
  st.error(f"❌ Could not convert prediction to number: {prediction}")
73
  else:
 
59
  st.subheader("πŸ” Raw Backend Response")
60
  st.json(result) # SHOW FULL JSON RETURNED
61
 
62
+ prediction = result.get("Predicted_Sales", None)
63
  except ValueError:
64
  prediction = response.text
65
  st.warning("⚠ Backend did not return JSON, showing raw text:")
 
67
 
68
  try:
69
  prediction = float(prediction)
70
+ st.success(f"βœ… Predicted Sales: **{prediction:.2f} units**")
71
  except (ValueError, TypeError):
72
  st.error(f"❌ Could not convert prediction to number: {prediction}")
73
  else: