Spaces:
Runtime error
Runtime error
revert height changes
Browse files
utils.py
CHANGED
@@ -13,18 +13,13 @@ def get_app(
|
|
13 |
def update_model(new_model: str) -> list[gr.Column]:
|
14 |
return [gr.Column(visible=model_name == new_model) for model_name in models]
|
15 |
|
16 |
-
chatbots = [gr.Chatbot(height=750) for _ in models]
|
17 |
-
|
18 |
with gr.Blocks() as demo:
|
19 |
model = gr.Dropdown(label="Select Model", choices=models, value=default_model)
|
20 |
|
21 |
columns = []
|
22 |
-
for model_name
|
23 |
with gr.Column(visible=model_name == default_model) as column:
|
24 |
-
|
25 |
-
gr.load(name=model_name, src=src, accept_token=accept_token, chatbot=chatbot, **kwargs)
|
26 |
-
else:
|
27 |
-
gr.load(name=model_name, src=src, accept_token=accept_token, **kwargs)
|
28 |
columns.append(column)
|
29 |
|
30 |
model.change(
|
@@ -35,4 +30,4 @@ def get_app(
|
|
35 |
queue=False,
|
36 |
)
|
37 |
|
38 |
-
return demo
|
|
|
13 |
def update_model(new_model: str) -> list[gr.Column]:
|
14 |
return [gr.Column(visible=model_name == new_model) for model_name in models]
|
15 |
|
|
|
|
|
16 |
with gr.Blocks() as demo:
|
17 |
model = gr.Dropdown(label="Select Model", choices=models, value=default_model)
|
18 |
|
19 |
columns = []
|
20 |
+
for model_name in models:
|
21 |
with gr.Column(visible=model_name == default_model) as column:
|
22 |
+
gr.load(name=model_name, src=src, accept_token=accept_token, **kwargs)
|
|
|
|
|
|
|
23 |
columns.append(column)
|
24 |
|
25 |
model.change(
|
|
|
30 |
queue=False,
|
31 |
)
|
32 |
|
33 |
+
return demo
|