Files changed (1) hide show
  1. app.py +7 -21
app.py CHANGED
@@ -14,31 +14,17 @@ def build_demo(elo_results_file, leaderboard_table_file):
14
  from fastchat.serve.gradio_web_server import block_css
15
 
16
  text_size = gr.themes.sizes.text_lg
17
-
 
 
18
  with gr.Blocks(
19
- title="Monitor",
20
- theme=gr.themes.Base(text_size=text_size),
21
  css=block_css,
22
  ) as demo:
23
- with gr.Tabs() as tabs:
24
- with gr.Tab("Leaderboard", id=0):
25
- leader_components = build_leaderboard_tab(
26
- elo_results_file,
27
- leaderboard_table_file,
28
- show_plot=True,
29
- mirror=True
30
- )
31
-
32
- with gr.Tab("Basic Stats", id=1):
33
- basic_components = build_basic_stats_tab()
34
-
35
- url_params = gr.JSON(visible=False)
36
- demo.load(
37
- load_demo,
38
- [url_params],
39
- basic_components + leader_components,
40
  )
41
-
42
  return demo
43
 
44
  if __name__ == "__main__":
 
14
  from fastchat.serve.gradio_web_server import block_css
15
 
16
  text_size = gr.themes.sizes.text_lg
17
+ theme = gr.themes.Base(text_size=text_size)
18
+ theme.set(button_secondary_background_fill_hover="*primary_300",
19
+ button_secondary_background_fill_hover_dark="*primary_700")
20
  with gr.Blocks(
21
+ title="Chatbot Arena Leaderboard",
22
+ theme=theme,
23
  css=block_css,
24
  ) as demo:
25
+ leader_components = build_leaderboard_tab(
26
+ elo_results_file, leaderboard_table_file, show_plot=True, mirror=True
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  )
 
28
  return demo
29
 
30
  if __name__ == "__main__":