Spaces:
Runtime error
Runtime error
PongsakornSET
commited on
Commit
•
b4d7e26
1
Parent(s):
990349c
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def main():
|
|
45 |
race = st.selectbox("Race",option=unique_race)# user's input
|
46 |
sex = st.selectbox("Sex",option=unique_sex)# user's input
|
47 |
hours_per_week = st.slider("Hours per week",min_value=1,max_value=100)# user's input
|
48 |
-
native_country = st.selectbox("Native country",option=unique_native_country# user's input
|
49 |
|
50 |
# clicked==True only when the button is clicked
|
51 |
clicked = st.form_submit_button("Predict income")
|
@@ -61,7 +61,7 @@ def main():
|
|
61 |
"hours.per.week": [hours_per_week],
|
62 |
"native.country": [native_country]}))
|
63 |
|
64 |
-
if __name__
|
65 |
main()
|
66 |
# Show prediction
|
67 |
result = ">50k" if result[0] == 1 else '<=50k'
|
|
|
45 |
race = st.selectbox("Race",option=unique_race)# user's input
|
46 |
sex = st.selectbox("Sex",option=unique_sex)# user's input
|
47 |
hours_per_week = st.slider("Hours per week",min_value=1,max_value=100)# user's input
|
48 |
+
native_country = st.selectbox("Native country",option=unique_native_country)# user's input
|
49 |
|
50 |
# clicked==True only when the button is clicked
|
51 |
clicked = st.form_submit_button("Predict income")
|
|
|
61 |
"hours.per.week": [hours_per_week],
|
62 |
"native.country": [native_country]}))
|
63 |
|
64 |
+
if __name__=="__main__":
|
65 |
main()
|
66 |
# Show prediction
|
67 |
result = ">50k" if result[0] == 1 else '<=50k'
|