PSNbst commited on
Commit
6e11687
·
verified ·
1 Parent(s): 566b7d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -88,19 +88,20 @@ def main_interface():
88
 
89
  with gr.Column(scale=2, elem_id="right-panel"):
90
  preview_gallery = gr.Gallery(label="Preview Combined Images", columns=3, elem_id="preview-gallery")
91
- download_zip_button = gr.Button("Download ZIP", elem_id="download-zip")
 
92
 
93
  # Button actions
94
  combine_button.click(
95
  process_images,
96
  inputs=[uploaded_files],
97
- outputs=[preview_gallery, download_zip_button],
98
  )
99
 
100
  download_zip_button.click(
101
- lambda x: x,
102
- inputs=[],
103
- outputs=[download_zip_button],
104
  )
105
 
106
  return interface
 
88
 
89
  with gr.Column(scale=2, elem_id="right-panel"):
90
  preview_gallery = gr.Gallery(label="Preview Combined Images", columns=3, elem_id="preview-gallery")
91
+ download_zip_button = gr.Button("Download ZIP", elem_id="download-zip", visible=False)
92
+ output_zip = gr.File(label="Download Combined ZIP", visible=False)
93
 
94
  # Button actions
95
  combine_button.click(
96
  process_images,
97
  inputs=[uploaded_files],
98
+ outputs=[preview_gallery, output_zip],
99
  )
100
 
101
  download_zip_button.click(
102
+ lambda zip_path: zip_path,
103
+ inputs=[output_zip],
104
+ outputs=[output_zip],
105
  )
106
 
107
  return interface