Update app.py
Browse files
app.py
CHANGED
|
@@ -61,15 +61,15 @@ with tab1:
|
|
| 61 |
"Store_Establishment_Year": est_year
|
| 62 |
}
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
|
| 74 |
|
| 75 |
# ----------------- Tab 2: Batch Prediction -----------------
|
|
|
|
| 61 |
"Store_Establishment_Year": est_year
|
| 62 |
}
|
| 63 |
|
| 64 |
+
try:
|
| 65 |
+
prediction = get_single_prediction(payload)
|
| 66 |
+
pred_value = prediction[0] if isinstance(prediction, list) else prediction
|
| 67 |
+
with col2:
|
| 68 |
+
st.success(f"✅ Predicted Sales: ₹{pred_value:,.2f}")
|
| 69 |
+
st.json({**payload, "Predicted_Sales": pred_value})
|
| 70 |
+
except Exception as e:
|
| 71 |
+
with col2:
|
| 72 |
+
st.error(f"⚠️ Error during prediction: {e}")
|
| 73 |
|
| 74 |
|
| 75 |
# ----------------- Tab 2: Batch Prediction -----------------
|