Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -266,7 +266,7 @@ def upload_image_to_storage(image, user_id, is_thumbnail = False):
|
|
266 |
if is_thumbnail:
|
267 |
file_path = f"user_images/{user_id}/thumbnails/{image_id}.png" # path for thumbnail
|
268 |
else:
|
269 |
-
file_path = f"
|
270 |
blob = bucket.blob(file_path)
|
271 |
|
272 |
# Convert PIL Image to BytesIO object
|
@@ -290,6 +290,7 @@ def load_image_data(user_id, start_index, batch_size):
|
|
290 |
if snapshot:
|
291 |
image_list = list(snapshot.items())
|
292 |
image_list.reverse() # Reverse to show latest first
|
|
|
293 |
new_images = []
|
294 |
for key, val in image_list[start_index:]:
|
295 |
new_images.append(val)
|
|
|
266 |
if is_thumbnail:
|
267 |
file_path = f"user_images/{user_id}/thumbnails/{image_id}.png" # path for thumbnail
|
268 |
else:
|
269 |
+
file_path = f"user_images/{user_id}/{image_id}.png" # path for high resolution images
|
270 |
blob = bucket.blob(file_path)
|
271 |
|
272 |
# Convert PIL Image to BytesIO object
|
|
|
290 |
if snapshot:
|
291 |
image_list = list(snapshot.items())
|
292 |
image_list.reverse() # Reverse to show latest first
|
293 |
+
|
294 |
new_images = []
|
295 |
for key, val in image_list[start_index:]:
|
296 |
new_images.append(val)
|