Commit ab4fe4f4 authored by AUTOMATIC's avatar AUTOMATIC

hide filenames for save button by default

parent cbf6dad0
...@@ -162,7 +162,7 @@ def save_files(js_data, images, do_make_zip, index): ...@@ -162,7 +162,7 @@ def save_files(js_data, images, do_make_zip, index):
zip_file.writestr(filenames[i], f.read()) zip_file.writestr(filenames[i], f.read())
fullfns.insert(0, zip_filepath) fullfns.insert(0, zip_filepath)
return fullfns, '', '', plaintext_to_html(f"Saved: {filenames[0]}") return gr.File.update(value=fullfns, visible=True), '', '', plaintext_to_html(f"Saved: {filenames[0]}")
def wrap_gradio_call(func, extra_outputs=None): def wrap_gradio_call(func, extra_outputs=None):
...@@ -553,7 +553,7 @@ def create_ui(wrap_gradio_gpu_call): ...@@ -553,7 +553,7 @@ def create_ui(wrap_gradio_gpu_call):
do_make_zip = gr.Checkbox(label="Make Zip when Save?", value=False) do_make_zip = gr.Checkbox(label="Make Zip when Save?", value=False)
with gr.Row(): with gr.Row():
download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False) download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False, visible=False)
with gr.Group(): with gr.Group():
html_info = gr.HTML() html_info = gr.HTML()
...@@ -741,7 +741,7 @@ def create_ui(wrap_gradio_gpu_call): ...@@ -741,7 +741,7 @@ def create_ui(wrap_gradio_gpu_call):
do_make_zip = gr.Checkbox(label="Make Zip when Save?", value=False) do_make_zip = gr.Checkbox(label="Make Zip when Save?", value=False)
with gr.Row(): with gr.Row():
download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False) download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False, visible=False)
with gr.Group(): with gr.Group():
html_info = gr.HTML() html_info = gr.HTML()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment