Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -158,7 +158,7 @@ with st.form("api_form"):
|
|
| 158 |
# To read file as bytes:
|
| 159 |
bytes_data = uploaded_file.getvalue()
|
| 160 |
#st.write(bytes_data)
|
| 161 |
-
st.image(uploaded_file)
|
| 162 |
|
| 163 |
|
| 164 |
submitted = st.form_submit_button("Submit")
|
|
@@ -169,7 +169,7 @@ with st.form("api_form"):
|
|
| 169 |
#prediction = output[0]['label']
|
| 170 |
#st.write(f'prediction = {prediction}')
|
| 171 |
#st.text(output)
|
| 172 |
-
prediction = predict(
|
| 173 |
st.write(prediction)
|
| 174 |
|
| 175 |
|
|
|
|
| 158 |
# To read file as bytes:
|
| 159 |
bytes_data = uploaded_file.getvalue()
|
| 160 |
#st.write(bytes_data)
|
| 161 |
+
image = st.image(uploaded_file)
|
| 162 |
|
| 163 |
|
| 164 |
submitted = st.form_submit_button("Submit")
|
|
|
|
| 169 |
#prediction = output[0]['label']
|
| 170 |
#st.write(f'prediction = {prediction}')
|
| 171 |
#st.text(output)
|
| 172 |
+
prediction = predict(image)
|
| 173 |
st.write(prediction)
|
| 174 |
|
| 175 |
|