Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,16 +23,14 @@ def main():
|
|
23 |
Land_use = st.selectbox("Land use",options = unique_LANDUSE_TYPE)
|
24 |
User = st.selectbox("Gender",options = unique_USER)
|
25 |
Month = st.selectbox("Hypertension",options = unique_Month)
|
26 |
-
pipe_diam = st.slider("pipe diam",min_value=0, max_value=10)
|
27 |
-
# clicked==True only when the button is clicked
|
28 |
clicked = st.form_submit_button("Predict income")
|
29 |
if clicked:
|
30 |
result=model.predict(pd.DataFrame({"LANDUSE_TYPE": [Land_use],
|
31 |
"USER": [User],
|
32 |
"Month": [Month],
|
33 |
"PIPE DIAM": [pipe_diam]}))
|
34 |
-
|
35 |
-
st.success("Water usage predict value:"+
|
36 |
if __name__ == '__main__':
|
37 |
-
main()
|
38 |
-
# Run main()
|
|
|
23 |
Land_use = st.selectbox("Land use",options = unique_LANDUSE_TYPE)
|
24 |
User = st.selectbox("Gender",options = unique_USER)
|
25 |
Month = st.selectbox("Hypertension",options = unique_Month)
|
26 |
+
pipe_diam = st.slider("pipe diam",min_value=0, max_value=10)
|
|
|
27 |
clicked = st.form_submit_button("Predict income")
|
28 |
if clicked:
|
29 |
result=model.predict(pd.DataFrame({"LANDUSE_TYPE": [Land_use],
|
30 |
"USER": [User],
|
31 |
"Month": [Month],
|
32 |
"PIPE DIAM": [pipe_diam]}))
|
33 |
+
str_result = str(result)
|
34 |
+
st.success("Water usage predict value:"+str_result)
|
35 |
if __name__ == '__main__':
|
36 |
+
main()
|
|