akhaliq HF staff commited on
Commit
0285458
1 Parent(s): affa990
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,9 +25,10 @@ def create_interface(model_name, src_registry, **kwargs):
25
 
26
  def update_model(new_model, container, src_registry, **kwargs):
27
  with container:
28
- container.load_none()
29
  new_interface = create_interface(new_model, src_registry, **kwargs)
30
  new_interface.render()
 
31
 
32
  with gr.Blocks(fill_height=True) as demo:
33
  # Meta Llama Tab
 
25
 
26
  def update_model(new_model, container, src_registry, **kwargs):
27
  with container:
28
+ container.visible = False # Hide current content
29
  new_interface = create_interface(new_model, src_registry, **kwargs)
30
  new_interface.render()
31
+ container.visible = True # Show new content
32
 
33
  with gr.Blocks(fill_height=True) as demo:
34
  # Meta Llama Tab