Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,6 @@ def main():
|
|
| 41 |
gill_size = st.selectbox("gill size",options = unique_gill_size)
|
| 42 |
gill_color = st.selectbox("gill color",options = unique_gill_color)
|
| 43 |
stalk_shape = st.selectbox("stalk shape",options = unique_stalk_shape)
|
| 44 |
-
stalk_shape = st.selectbox("stalk shape",options = unique_stalk_shape)
|
| 45 |
stalk_root = st.selectbox("stalk root",options = unique_stalk_root)
|
| 46 |
stalk_surface_above_ring = st.selectbox("stalk surface above ring",options = unique_stalk_surface_above_ring)
|
| 47 |
stalk_surface_below_ring = st.selectbox("stalk surface below ring",options = unique_stalk_surface_below_ring)
|
|
@@ -59,7 +58,28 @@ def main():
|
|
| 59 |
|
| 60 |
clicked = st.form_submit_button("Predict income")
|
| 61 |
if clicked:
|
| 62 |
-
result=model.predict(pd.DataFrame({'cap-shape':[cap_shape],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
# Show prediction
|
| 64 |
result = 'eatable' if result[0]==1 else 'poisonous'
|
| 65 |
st.success("This Mushroom is "+result)
|
|
|
|
| 41 |
gill_size = st.selectbox("gill size",options = unique_gill_size)
|
| 42 |
gill_color = st.selectbox("gill color",options = unique_gill_color)
|
| 43 |
stalk_shape = st.selectbox("stalk shape",options = unique_stalk_shape)
|
|
|
|
| 44 |
stalk_root = st.selectbox("stalk root",options = unique_stalk_root)
|
| 45 |
stalk_surface_above_ring = st.selectbox("stalk surface above ring",options = unique_stalk_surface_above_ring)
|
| 46 |
stalk_surface_below_ring = st.selectbox("stalk surface below ring",options = unique_stalk_surface_below_ring)
|
|
|
|
| 58 |
|
| 59 |
clicked = st.form_submit_button("Predict income")
|
| 60 |
if clicked:
|
| 61 |
+
result=model.predict(pd.DataFrame({'cap-shape':[cap_shape],
|
| 62 |
+
'cap-surface':[cap_surface],
|
| 63 |
+
'cap-color':[cap_color],
|
| 64 |
+
'bruises':[bruises],
|
| 65 |
+
'odor':[odor],
|
| 66 |
+
'gill-attachment':[gill_attachment],
|
| 67 |
+
'gill-spacing':[gill_spacing],
|
| 68 |
+
'gill-size':[gill_size],
|
| 69 |
+
'gill-color':[gill_color],
|
| 70 |
+
'stalk-shape':[stalk_shape],
|
| 71 |
+
'stalk-root':[stalk_root],
|
| 72 |
+
'stalk-surface-above-ring':[stalk_surface_above_ring],
|
| 73 |
+
'stalk-surface-below-ring':[stalk_surface_below_ring],
|
| 74 |
+
'stalk-color-above-ring':[stalk_color_above_ring],
|
| 75 |
+
'stalk-color-below-ring':[stalk_color_below_ring],
|
| 76 |
+
'veil-type':[veil_type],
|
| 77 |
+
'veil-color':[veil_color],
|
| 78 |
+
'ring-number':[ring_number],
|
| 79 |
+
'ring-type':[ring_type],
|
| 80 |
+
'spore-print-color':[spore_print_color],
|
| 81 |
+
'population':[population],
|
| 82 |
+
'habitat':[habitat]}))
|
| 83 |
# Show prediction
|
| 84 |
result = 'eatable' if result[0]==1 else 'poisonous'
|
| 85 |
st.success("This Mushroom is "+result)
|