Update app.py
Browse files
app.py
CHANGED
|
@@ -148,7 +148,7 @@ def handle_uploads(input_video, input_images, session_id):
|
|
| 148 |
|
| 149 |
|
| 150 |
# 3) Update gallery on upload
|
| 151 |
-
def update_gallery_on_upload(input_video, input_images):
|
| 152 |
"""
|
| 153 |
Whenever user uploads or changes files, immediately handle them
|
| 154 |
and show in the gallery. Return (target_dir, image_paths).
|
|
@@ -156,7 +156,8 @@ def update_gallery_on_upload(input_video, input_images):
|
|
| 156 |
"""
|
| 157 |
if not input_video and not input_images:
|
| 158 |
return None, None, None
|
| 159 |
-
|
|
|
|
| 160 |
return None, target_dir, image_paths
|
| 161 |
|
| 162 |
|
|
|
|
| 148 |
|
| 149 |
|
| 150 |
# 3) Update gallery on upload
|
| 151 |
+
def update_gallery_on_upload(input_video, input_images, session_id):
|
| 152 |
"""
|
| 153 |
Whenever user uploads or changes files, immediately handle them
|
| 154 |
and show in the gallery. Return (target_dir, image_paths).
|
|
|
|
| 156 |
"""
|
| 157 |
if not input_video and not input_images:
|
| 158 |
return None, None, None
|
| 159 |
+
|
| 160 |
+
target_dir, image_paths = handle_uploads(input_video, input_images, session_id)
|
| 161 |
return None, target_dir, image_paths
|
| 162 |
|
| 163 |
|