saritha5 commited on
Commit
9adc8d8
·
1 Parent(s): c6c467c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -161,9 +161,10 @@ def prediction():
161
  'policy_sales_channel':policy_sales_channel,
162
  'number_of_days_company' :number_of_days_company
163
  }
164
- report_data = pd.DataFrame(user_report_data, index=[0])
165
  st.write(report_data)
166
-
 
167
  response = model_xgb.predict(report_data)
168
  if response==1:
169
  st.subheader('This customer willing to buy a vehicle insurance')
 
161
  'policy_sales_channel':policy_sales_channel,
162
  'number_of_days_company' :number_of_days_company
163
  }
164
+ #report_data = pd.DataFrame(user_report_data, index=[0])
165
  st.write(report_data)
166
+ user_data = np.array(['gender','age','license','regioncode','is_previously_insured','vechile_age','is_your_vechile_damaged','annual_premium','policy_sales_channel','number_of_days_company',ndim=2])
167
+ report_data=scaler.transform(user_data)
168
  response = model_xgb.predict(report_data)
169
  if response==1:
170
  st.subheader('This customer willing to buy a vehicle insurance')