Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Refactor gradio_block_arena_anony.py and gradio_block_arena_named.py …
…to improve code readability
  • Loading branch information
surak committed Jan 25, 2024
commit c3fbf6336b7e37d3f7895a35e6982c5542a1dcc6
5 changes: 4 additions & 1 deletion fastchat/serve/gradio_block_arena_anony.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,10 @@ def build_side_by_side_ui_anony(models):
label = "Model A" if i == 0 else "Model B"
with gr.Column():
chatbots[i] = gr.Chatbot(
label=label, elem_id=f"chatbot", height=550, show_copy_button=True
label=label,
elem_id=f"chatbot",
height=550,
show_copy_button=True,
)

with gr.Row():
Expand Down
5 changes: 4 additions & 1 deletion fastchat/serve/gradio_block_arena_named.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@ def build_side_by_side_ui_named(models):
label = "Model A" if i == 0 else "Model B"
with gr.Column():
chatbots[i] = gr.Chatbot(
label=label, elem_id=f"chatbot", height=550, show_copy_button=True
label=label,
elem_id=f"chatbot",
height=550,
show_copy_button=True,
)

with gr.Row():
Expand Down