z-uo commited on
Commit
680e883
1 Parent(s): c4f3094

better text and spinner

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -176,14 +176,15 @@ def predict(inp):
176
 
177
  # STREAMLIT
178
 
179
- uploader = st.file_uploader('Upload your portrait 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
- pil_scaled, pil_depth, html_string = predict(pil_image)
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