Mummia-99 commited on
Commit
81b2eea
·
verified ·
1 Parent(s): 247e317

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -74,17 +74,17 @@ with col2:
74
 
75
 
76
  if st.button("Submit"):
77
-
78
- # Scaler the values
79
-
80
- credit_score=np.round(((credit_score-650.528800)/96.653299),3)
81
- age=np.round(((age-38.921800)/10.487806),3)
82
- tenure=np.round(((tenure-5.012800)/2.8921740),3)
83
- balance=np.round(((balance-76485.889288)/62397.405202),3)
84
- e_salary=np.round(((e_salary-100090.239881)/57510.492818),3)
85
-
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 = {
 
74
 
75
 
76
  if st.button("Submit"):
77
+ try:
78
+ # Scaler the values
79
+
80
+ credit_score=np.round(((credit_score-650.528800)/96.653299),3)
81
+ age=np.round(((age-38.921800)/10.487806),3)
82
+ tenure=np.round(((tenure-5.012800)/2.8921740),3)
83
+ balance=np.round(((balance-76485.889288)/62397.405202),3)
84
+ e_salary=np.round(((e_salary-100090.239881)/57510.492818),3)
85
+
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 = {