Spaces:
Runtime error
Runtime error
Daniel Verdu
commited on
Commit
•
5cc54b6
1
Parent(s):
cc9c1ce
fixed extra iteration while uploading new files
Browse files
app.py
CHANGED
@@ -262,10 +262,10 @@ if colorizer is not None:
|
|
262 |
|
263 |
# If session state is not empty, we will process stored images
|
264 |
if st.session_state['uploaded_files']:
|
265 |
-
if len(uploaded_files) == 1:
|
266 |
-
display_single_image(uploaded_files[0], st.session_state.max_img_size)
|
267 |
-
elif len(uploaded_files) > 1:
|
268 |
-
process_multiple_images(uploaded_files, st.session_state.max_img_size)
|
269 |
|
270 |
# Reset session state variable
|
271 |
st.session_state['uploaded_files'] = None
|
|
|
262 |
|
263 |
# If session state is not empty, we will process stored images
|
264 |
if st.session_state['uploaded_files']:
|
265 |
+
if len(st.session_state['uploaded_files']) == 1:
|
266 |
+
display_single_image(st.session_state['uploaded_files'][0], st.session_state.max_img_size)
|
267 |
+
elif len(st.session_state['uploaded_files']) > 1:
|
268 |
+
process_multiple_images(st.session_state['uploaded_files'], st.session_state.max_img_size)
|
269 |
|
270 |
# Reset session state variable
|
271 |
st.session_state['uploaded_files'] = None
|