Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def main():
|
|
| 44 |
relationship = st.selectbox("Relationship", options=unique_relationship)
|
| 45 |
race = st.selectbox("Race", options=unique_race)
|
| 46 |
sex = st.selectbox("Sex", options=unique_sex)
|
| 47 |
-
hours_per_week = st.
|
| 48 |
native_country = st.selectbox("Native_country", options=unique_country)
|
| 49 |
|
| 50 |
# clicked==True only when the button is clicked
|
|
@@ -62,7 +62,7 @@ def main():
|
|
| 62 |
"native.country": [native_country]}))
|
| 63 |
# Show prediction
|
| 64 |
result = '>50K' if result[0] == 1 else '<=50K'
|
| 65 |
-
st.success("Your predicted income is "
|
| 66 |
|
| 67 |
# Run main()
|
| 68 |
if __name__ == "__main__":
|
|
|
|
| 44 |
relationship = st.selectbox("Relationship", options=unique_relationship)
|
| 45 |
race = st.selectbox("Race", options=unique_race)
|
| 46 |
sex = st.selectbox("Sex", options=unique_sex)
|
| 47 |
+
hours_per_week = st.slider("Hours_per_week", min_value=1, max_value=100)
|
| 48 |
native_country = st.selectbox("Native_country", options=unique_country)
|
| 49 |
|
| 50 |
# clicked==True only when the button is clicked
|
|
|
|
| 62 |
"native.country": [native_country]}))
|
| 63 |
# Show prediction
|
| 64 |
result = '>50K' if result[0] == 1 else '<=50K'
|
| 65 |
+
st.success("Your predicted income is ",result)
|
| 66 |
|
| 67 |
# Run main()
|
| 68 |
if __name__ == "__main__":
|