Skip to content

Commit

Permalink
Copy button (lm-sys#2963)
Browse files Browse the repository at this point in the history
  • Loading branch information
surak authored and zhanghao.smooth committed Jan 26, 2024
1 parent a9e9d5a commit e5f258e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
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
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
label=label,
elem_id=f"chatbot",
height=550,
show_copy_button=True,
)

with gr.Row():
Expand Down
1 change: 1 addition & 0 deletions fastchat/serve/gradio_web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ def build_single_model_ui(models, add_promotion_links=False):
elem_id="chatbot",
label="Scroll down and start chatting",
height=550,
show_copy_button=True,
)
with gr.Row():
textbox = gr.Textbox(
Expand Down

0 comments on commit e5f258e

Please sign in to comment.