multimodalart HF staff commited on
Commit
9b78871
1 Parent(s): cab8b2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -294,11 +294,15 @@ def check_status(top_description):
294
  else:
295
  update_top_tag = gr.update(value=top_description)
296
  show_outputs = False
 
 
 
 
297
  return [
298
  update_top_tag, #top_description
299
  gr.update(visible=show_outputs), #try_your_model
300
  gr.update(visible=show_outputs), #push_to_hub
301
- gr.update(visible=show_outputs, value=["diffusers_model.zip"]), #result
302
  gr.update(visible=show_outputs), #convert_button
303
  ]
304
 
 
294
  else:
295
  update_top_tag = gr.update(value=top_description)
296
  show_outputs = False
297
+ if os.path.exists("diffusers_model.zip"):
298
+ update_files_tag = gr.update(visible=show_outputs, value=["diffusers_model.zip"])
299
+ else:
300
+ update_files_tag = gr.update(visible=show_outputs)
301
  return [
302
  update_top_tag, #top_description
303
  gr.update(visible=show_outputs), #try_your_model
304
  gr.update(visible=show_outputs), #push_to_hub
305
+ update_files_tag, #result
306
  gr.update(visible=show_outputs), #convert_button
307
  ]
308