Mummia-99 commited on
Commit
ba8059e
·
verified ·
1 Parent(s): 2bfffdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -23
app.py CHANGED
@@ -86,32 +86,33 @@ if st.button("Submit"):
86
 
87
  prediction = bank_model.predict([[credit_score, geography_value, gender_value, age, tenure, balance, e_salary, active_holder_value]])
88
 
89
- # Define messages and colors
90
- review_status = {
91
- 1: ("✅ The Customer is Interseted in our Bank", "#32CD32"), # Green
92
- 0: (" The Customer is Not Interseted in our Bank", "#FF4500") # Red-Orange
93
- }
 
94
 
95
- # Get message and color based on prediction
96
- message, color = review_status.get(prediction, ("❓ Unknown Prediction", "#808080"))
97
 
98
- # Display styled result
99
- st.markdown(f"""
100
- <div style="
101
- padding: 15px;
102
- background-color: {color};
103
- border-radius: 10px;
104
- text-align: center;
105
- font-size: 18px;
106
- font-weight: bold;
107
- color: white;">
108
- {message}
109
- </div>
110
- """, unsafe_allow_html=True)
111
 
112
- except Exception as e:
113
- st.error(f"⚠️ Error in prediction: {e}")
114
 
115
- st.write("")
116
 
117
 
 
86
 
87
  prediction = bank_model.predict([[credit_score, geography_value, gender_value, age, tenure, balance, e_salary, active_holder_value]])
88
 
89
+ st.write(prediction)
90
+ # # Define messages and colors
91
+ # review_status = {
92
+ # 1: (" The Customer is Interseted in our Bank", "#32CD32"), # Green
93
+ # 0: ("❌ The Customer is Not Interseted in our Bank", "#FF4500") # Red-Orange
94
+ # }
95
 
96
+ # # Get message and color based on prediction
97
+ # message, color = review_status.get(prediction, ("❓ Unknown Prediction", "#808080"))
98
 
99
+ # # Display styled result
100
+ # st.markdown(f"""
101
+ # <div style="
102
+ # padding: 15px;
103
+ # background-color: {color};
104
+ # border-radius: 10px;
105
+ # text-align: center;
106
+ # font-size: 18px;
107
+ # font-weight: bold;
108
+ # color: white;">
109
+ # {message}
110
+ # </div>
111
+ # """, unsafe_allow_html=True)
112
 
113
+ # except Exception as e:
114
+ # st.error(f"⚠️ Error in prediction: {e}")
115
 
116
+ # st.write("")
117
 
118