Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -122,16 +122,17 @@ def main():
|
|
122 |
st.write(user_input)
|
123 |
|
124 |
prediction = model.predict(user_input)
|
125 |
-
|
126 |
-
|
127 |
st.subheader('Prediction:')
|
128 |
-
if
|
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()
|