Skip to content

Commit a25bd4d

Browse files
committed
Merge
1 parent 24ce7b7 commit a25bd4d

File tree

3 files changed

+5
-35
lines changed

3 files changed

+5
-35
lines changed

fastchat/serve/gradio_block_arena_vision.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,11 @@ def add_text(state, model_selector, chat_input, context: Context, request: gr.Re
258258
state.conv.append_message(state.conv.roles[0], post_processed_text)
259259
state.skip_next = True
260260
gr.Warning(MODERATION_MSG)
261-
return (state, gradio_chatbot_before_user_input, None, "", no_change_btn) + (
262-
no_change_btn,
263-
) + (no_change_btn,) * 5
261+
return (
262+
(state, gradio_chatbot_before_user_input, None, "", no_change_btn)
263+
+ (no_change_btn,)
264+
+ (no_change_btn,) * 5
265+
)
264266

265267
if (len(state.conv.messages) - state.conv.offset) // 2 >= CONVERSATION_TURN_LIMIT:
266268
logger.info(f"conversation turn limit. ip: {ip}. text: {text}")

fastchat/serve/gradio_block_arena_vision_named.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,17 @@
3434
add_image,
3535
_prepare_text_with_image,
3636
convert_images_to_conversation_format,
37-
<<<<<<< HEAD
3837
enable_multimodal_keep_input,
3938
enable_multimodal_clear_input,
40-
=======
41-
enable_multimodal,
42-
>>>>>>> main
4339
disable_multimodal,
4440
invisible_text,
4541
invisible_btn,
4642
visible_text,
4743
)
48-
<<<<<<< HEAD
4944
from fastchat.serve.moderation.moderator import (
5045
BaseContentModerator,
5146
AzureAndOpenAIContentModerator,
5247
)
53-
=======
54-
>>>>>>> main
5548
from fastchat.serve.gradio_global_state import Context
5649
from fastchat.serve.gradio_web_server import (
5750
State,

fastchat/serve/monitor/monitor.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,8 @@ def update_leaderboard_and_plots(category, filters):
631631
elem_id="leaderboard_markdown",
632632
)
633633

634-
<<<<<<< HEAD
635-
leader_component_values[:] = [default_md, p1, p2, p3, p4]
636-
=======
637634
if not vision:
638635
leader_component_values[:] = [default_md, p1, p2, p3, p4]
639-
>>>>>>> main
640636

641637
if show_plot:
642638
more_stats_md = gr.Markdown(
@@ -968,26 +964,6 @@ def build_leaderboard_tab(
968964
""",
969965
elem_id="leaderboard_markdown",
970966
)
971-
<<<<<<< HEAD
972-
with gr.Tab("Arena", id=1):
973-
gr_plots = build_arena_tab(
974-
elo_results_text,
975-
model_table_df,
976-
default_md,
977-
show_plot=show_plot,
978-
)
979-
980-
if vision:
981-
with gr.Tab("Arena (Vision)", id=2):
982-
build_arena_tab(
983-
elo_results_vision,
984-
model_table_df,
985-
default_md,
986-
vision=True,
987-
show_plot=show_plot,
988-
)
989-
990-
=======
991967
with gr.Tab("Arena (Vision)", id=2):
992968
build_arena_tab(
993969
elo_results_vision,
@@ -996,7 +972,6 @@ def build_leaderboard_tab(
996972
vision=True,
997973
show_plot=show_plot,
998974
)
999-
>>>>>>> main
1000975
model_to_score = {}
1001976
if arena_hard_leaderboard is not None:
1002977
with gr.Tab("Arena-Hard-Auto", id=3):

0 commit comments

Comments
 (0)