awacke1 commited on
Commit
de9b7a6
1 Parent(s): a8114ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -49,7 +49,6 @@ def encode_file_to_base64(file_path):
49
  encoded = base64.b64encode(file.read()).decode()
50
  return encoded
51
 
52
-
53
  # Function to save all images as a zip file and provide a base64 download link
54
  def save_all_images(images):
55
  if len(images) == 0:
@@ -79,6 +78,11 @@ def save_all_button_click():
79
  if download_link:
80
  gr.write(download_link)
81
 
 
 
 
 
 
82
  # Function to handle "Clear All" button click
83
  def clear_all_button_click():
84
  clear_all_images()
@@ -86,8 +90,6 @@ def clear_all_button_click():
86
 
87
 
88
 
89
-
90
-
91
  print(f"SAFETY_CHECKER: {SAFETY_CHECKER}")
92
  print(f"TORCH_COMPILE: {TORCH_COMPILE}")
93
  print(f"device: {device}")
 
49
  encoded = base64.b64encode(file.read()).decode()
50
  return encoded
51
 
 
52
  # Function to save all images as a zip file and provide a base64 download link
53
  def save_all_images(images):
54
  if len(images) == 0:
 
78
  if download_link:
79
  gr.write(download_link)
80
 
81
+ zip_file = create_zip_of_files(all_files)
82
+ st.markdown(get_zip_download_link(zip_file), unsafe_allow_html=True)
83
+
84
+
85
+
86
  # Function to handle "Clear All" button click
87
  def clear_all_button_click():
88
  clear_all_images()
 
90
 
91
 
92
 
 
 
93
  print(f"SAFETY_CHECKER: {SAFETY_CHECKER}")
94
  print(f"TORCH_COMPILE: {TORCH_COMPILE}")
95
  print(f"device: {device}")