saritha5 commited on
Commit
0b3ee8b
·
1 Parent(s): 3546cd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -115,16 +115,14 @@ def prediction(report_data):
115
  #scaling the user data
116
  report_data=scaler.transform(report_data)
117
  response = model_xgb.predict(report_data)
118
- def fun():
119
- if response==1:
120
- st.subheader('This customer willing to buy a vehicle insurance')
121
  else:
122
- st.subheader('This customer will not buy a vehicle insurance')
123
- if st.button():
124
- fun()
125
 
126
  y_pred = prediction(user_data)
127
-
128
 
129
 
130
 
 
115
  #scaling the user data
116
  report_data=scaler.transform(report_data)
117
  response = model_xgb.predict(report_data)
118
+ if response==1:
119
+ return 'This customer willing to buy a vehicle insurance'
 
120
  else:
121
+ return 'This customer will not buy a vehicle insurance'
122
+
 
123
 
124
  y_pred = prediction(user_data)
125
+ st.header(y_pred)
126
 
127
 
128