Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
infwinston committed Oct 15, 2024
1 parent 63d5da2 commit 40fd4b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions fastchat/serve/gradio_block_arena_anony.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ def load_demo_side_by_side_anony(models_, url_params):
global models
models = models_

states = (None,) * num_sides
selector_updates = (
states = [None] * num_sides
selector_updates = [
gr.Markdown(visible=True),
gr.Markdown(visible=True),
)
]

return states + selector_updates

Expand Down
6 changes: 3 additions & 3 deletions fastchat/serve/gradio_block_arena_named.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def set_global_vars_named(enable_moderation_):


def load_demo_side_by_side_named(models, url_params):
states = (None,) * num_sides
states = [None] * num_sides

model_left = models[0] if len(models) > 0 else ""
if len(models) > 1:
Expand All @@ -57,10 +57,10 @@ def load_demo_side_by_side_named(models, url_params):
else:
model_right = model_left

selector_updates = (
selector_updates = [
gr.Dropdown(choices=models, value=model_left, visible=True),
gr.Dropdown(choices=models, value=model_right, visible=True),
)
]

return states + selector_updates

Expand Down

0 comments on commit 40fd4b8

Please sign in to comment.