From 5c3d4295bfaad43a4884d33341264347e14a015c Mon Sep 17 00:00:00 2001 From: Anastasios Date: Tue, 26 Nov 2024 19:49:33 +0000 Subject: [PATCH 1/2] [add theme fixes, breaks on serve otherwise] --- fastchat/serve/monitor/monitor.py | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/fastchat/serve/monitor/monitor.py b/fastchat/serve/monitor/monitor.py index c07ee4669..4b6b1fbed 100644 --- a/fastchat/serve/monitor/monitor.py +++ b/fastchat/serve/monitor/monitor.py @@ -1075,30 +1075,30 @@ def build_demo(elo_results_file, leaderboard_table_file, arena_hard_leaderboard) text_size = gr.themes.sizes.text_lg # load theme from theme.json - theme = gr.themes.Default.load("theme.json") + #theme = gr.themes.Default.load("theme.json") # set text size to large - theme.text_size = text_size - theme.set( - button_large_text_size="20px", - button_small_text_size="20px", - button_large_text_weight="100", - button_small_text_weight="100", - button_shadow="*shadow_drop_lg", - button_shadow_hover="*shadow_drop_lg", - checkbox_label_shadow="*shadow_drop_lg", - button_shadow_active="*shadow_inset", - button_secondary_background_fill="*primary_300", - button_secondary_background_fill_dark="*primary_700", - button_secondary_background_fill_hover="*primary_200", - button_secondary_background_fill_hover_dark="*primary_500", - button_secondary_text_color="*primary_800", - button_secondary_text_color_dark="white", - ) + #theme.text_size = text_size + #theme.set( + # button_large_text_size="20px", + # button_small_text_size="20px", + # button_large_text_weight="100", + # button_small_text_weight="100", + # button_shadow="*shadow_drop_lg", + # button_shadow_hover="*shadow_drop_lg", + # checkbox_label_shadow="*shadow_drop_lg", + # button_shadow_active="*shadow_inset", + # button_secondary_background_fill="*primary_300", + # button_secondary_background_fill_dark="*primary_700", + # button_secondary_background_fill_hover="*primary_200", + # button_secondary_background_fill_hover_dark="*primary_500", + # button_secondary_text_color="*primary_800", + # button_secondary_text_color_dark="white", + #) with gr.Blocks( title="Chatbot Arena Leaderboard", - # theme=gr.themes.Default(text_size=text_size), - theme=theme, + theme=gr.themes.Default(text_size=text_size), + #theme=theme, css=block_css, ) as demo: with gr.Tabs() as tabs: From 54a2b4b1f4ff40b0cf87c148ff34b4b97b5303c7 Mon Sep 17 00:00:00 2001 From: Anastasios Date: Tue, 26 Nov 2024 19:54:51 +0000 Subject: [PATCH 2/2] [run format.sh] --- fastchat/serve/monitor/monitor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fastchat/serve/monitor/monitor.py b/fastchat/serve/monitor/monitor.py index 4b6b1fbed..28085c631 100644 --- a/fastchat/serve/monitor/monitor.py +++ b/fastchat/serve/monitor/monitor.py @@ -1075,10 +1075,10 @@ def build_demo(elo_results_file, leaderboard_table_file, arena_hard_leaderboard) text_size = gr.themes.sizes.text_lg # load theme from theme.json - #theme = gr.themes.Default.load("theme.json") + # theme = gr.themes.Default.load("theme.json") # set text size to large - #theme.text_size = text_size - #theme.set( + # theme.text_size = text_size + # theme.set( # button_large_text_size="20px", # button_small_text_size="20px", # button_large_text_weight="100", @@ -1093,12 +1093,12 @@ def build_demo(elo_results_file, leaderboard_table_file, arena_hard_leaderboard) # button_secondary_background_fill_hover_dark="*primary_500", # button_secondary_text_color="*primary_800", # button_secondary_text_color_dark="white", - #) + # ) with gr.Blocks( title="Chatbot Arena Leaderboard", theme=gr.themes.Default(text_size=text_size), - #theme=theme, + # theme=theme, css=block_css, ) as demo: with gr.Tabs() as tabs: