Spaces:
Runtime error
Runtime error
better text and spinner
Browse files
app.py
CHANGED
|
@@ -176,14 +176,15 @@ def predict(inp):
|
|
| 176 |
|
| 177 |
# STREAMLIT
|
| 178 |
|
| 179 |
-
uploader = st.file_uploader('
|
| 180 |
|
| 181 |
if uploader is not None:
|
| 182 |
pil_image = Image.open(uploader)
|
| 183 |
else:
|
| 184 |
pil_image = Image.open('119_image.png')
|
| 185 |
-
|
| 186 |
-
|
|
|
|
| 187 |
components.html(html_string)
|
| 188 |
#st.markdown(html_string, unsafe_allow_html=True)
|
| 189 |
|
|
|
|
| 176 |
|
| 177 |
# STREAMLIT
|
| 178 |
|
| 179 |
+
uploader = st.file_uploader('Wait the demo file to be rendered and upload your favourite image here.',type=['jpg','jpeg','png'])
|
| 180 |
|
| 181 |
if uploader is not None:
|
| 182 |
pil_image = Image.open(uploader)
|
| 183 |
else:
|
| 184 |
pil_image = Image.open('119_image.png')
|
| 185 |
+
|
| 186 |
+
with st.spinner("Waiting for the predictions..."):
|
| 187 |
+
pil_scaled, pil_depth, html_string = predict(pil_image)
|
| 188 |
components.html(html_string)
|
| 189 |
#st.markdown(html_string, unsafe_allow_html=True)
|
| 190 |
|