Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -25,10 +25,11 @@ def create_interface(model_name, src_registry, **kwargs):
|
|
25 |
|
26 |
def update_model(new_model, container, src_registry, **kwargs):
|
27 |
with container:
|
28 |
-
|
|
|
|
|
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
|
|
|
25 |
|
26 |
def update_model(new_model, container, src_registry, **kwargs):
|
27 |
with container:
|
28 |
+
# Clear existing content first
|
29 |
+
container.clear()
|
30 |
+
# Create and render new interface
|
31 |
new_interface = create_interface(new_model, src_registry, **kwargs)
|
32 |
new_interface.render()
|
|
|
33 |
|
34 |
with gr.Blocks(fill_height=True) as demo:
|
35 |
# Meta Llama Tab
|