Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,7 @@ def save_all_images(images):
|
|
92 |
zip_filename = create_zip(images) # Create a zip file from the list of image files
|
93 |
zip_base64 = encode_file_to_base64(zip_filename) # Encode the zip file to base64
|
94 |
download_link = f'<a href="data:application/zip;base64,{zip_base64}" download="{zip_filename}">Download All</a>'
|
95 |
-
gr.
|
96 |
print(download_link)
|
97 |
return zip_filename, download_link
|
98 |
|
@@ -100,10 +100,10 @@ def save_all_images(images):
|
|
100 |
def save_all_button_click():
|
101 |
images = [file for file in os.listdir() if file.lower().endswith((".png", ".jpg", ".jpeg"))]
|
102 |
zip_filename, download_link = save_all_images(images)
|
103 |
-
if zip_filename:
|
104 |
-
|
105 |
-
if download_link:
|
106 |
-
|
107 |
|
108 |
|
109 |
# Function to handle "Clear All" button click
|
|
|
92 |
zip_filename = create_zip(images) # Create a zip file from the list of image files
|
93 |
zip_base64 = encode_file_to_base64(zip_filename) # Encode the zip file to base64
|
94 |
download_link = f'<a href="data:application/zip;base64,{zip_base64}" download="{zip_filename}">Download All</a>'
|
95 |
+
gr.File(download_link)
|
96 |
print(download_link)
|
97 |
return zip_filename, download_link
|
98 |
|
|
|
100 |
def save_all_button_click():
|
101 |
images = [file for file in os.listdir() if file.lower().endswith((".png", ".jpg", ".jpeg"))]
|
102 |
zip_filename, download_link = save_all_images(images)
|
103 |
+
#if zip_filename:
|
104 |
+
# gr.HTML(zip_filename)
|
105 |
+
#if download_link:
|
106 |
+
# gr.HTML(download_link)
|
107 |
|
108 |
|
109 |
# Function to handle "Clear All" button click
|