EAV123 commited on
Commit
85da704
·
verified ·
1 Parent(s): e6d34bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -122,16 +122,17 @@ def main():
122
  st.write(user_input)
123
 
124
  prediction = model.predict(user_input)
125
- prediction_proba = model.predict(user_input, raw_score=True)
126
-
127
  st.subheader('Prediction:')
128
- if prediction[0] == 1:
129
- st.write('The model predicts: Income > $50K')
130
- else:
131
  st.write('The model predicts: Income <= $50K')
 
 
132
 
133
  st.subheader('Prediction Probability:')
134
  st.write(f'Probability of making over $50K: {prediction_proba[0]:.2f}')
135
 
136
  if __name__ == '__main__':
137
  main()
 
 
 
122
  st.write(user_input)
123
 
124
  prediction = model.predict(user_input)
125
+
 
126
  st.subheader('Prediction:')
127
+ if prediction_proba[0] < 0.5:
 
 
128
  st.write('The model predicts: Income <= $50K')
129
+ else:
130
+ st.write('The model predicts: Income > $50K')
131
 
132
  st.subheader('Prediction Probability:')
133
  st.write(f'Probability of making over $50K: {prediction_proba[0]:.2f}')
134
 
135
  if __name__ == '__main__':
136
  main()
137
+ if __name__ == '__main__':
138
+ main()