Nuttanicha commited on
Commit
67fa76f
1 Parent(s): 06af648

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,7 +45,7 @@ def main():
45
  # clicked==True only when the button is clicked
46
  clicked = st.form_submit_button("Predict y")
47
  if clicked:
48
- result=model.predict(pd.DataFrame({"age": [age],
49
  "job": [job],
50
  "marital": [marital],
51
  "education": [EDU_DICT[education]],
@@ -63,7 +63,7 @@ def main():
63
  "poutcome": [poutcome]}))
64
 
65
  # Show prediction
66
- result = 'yes' if result[0] == 1 else 'no'
67
  st.success("Your predicted y is "+result) #แสดงผล
68
 
69
  # Run main()
 
45
  # clicked==True only when the button is clicked
46
  clicked = st.form_submit_button("Predict y")
47
  if clicked:
48
+ result=model.predict(pd.DataFrame({"age": [age],
49
  "job": [job],
50
  "marital": [marital],
51
  "education": [EDU_DICT[education]],
 
63
  "poutcome": [poutcome]}))
64
 
65
  # Show prediction
66
+ result = 'yes' if result[0] == 15 else 'no'
67
  st.success("Your predicted y is "+result) #แสดงผล
68
 
69
  # Run main()