multimodalart HF staff commited on
Commit
2cd9a44
1 Parent(s): b764093

Don't update if not needed

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -291,6 +291,8 @@ def check_status():
291
  </div>
292
  ''')
293
  show_outputs = False
 
 
294
  return [
295
  update_top_tag, #top_description
296
  gr.update(visible=show_outputs), #try_your_model
@@ -441,6 +443,6 @@ with gr.Blocks(css=css) as demo:
441
  convert_button.click(fn=convert_to_ckpt, inputs=[], outputs=result)
442
 
443
  #Checks if the training is running
444
- demo.load(fn=check_status,inputs=None, outputs=[top_description, try_your_model, push_to_hub, result, convert_button])
445
 
446
  demo.launch(debug=True)
 
291
  </div>
292
  ''')
293
  show_outputs = False
294
+ else:
295
+ update_top_tag = gr.Update()
296
  return [
297
  update_top_tag, #top_description
298
  gr.update(visible=show_outputs), #try_your_model
 
443
  convert_button.click(fn=convert_to_ckpt, inputs=[], outputs=result)
444
 
445
  #Checks if the training is running
446
+ demo.load(fn=check_status, inputs=[], outputs=[top_description, try_your_model, push_to_hub, result, convert_button])
447
 
448
  demo.launch(debug=True)