Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -151,6 +151,7 @@ def build_basic_stats_tab():
|
|
151 |
return [md0, plot_1, md1, md2, md3, md4]
|
152 |
|
153 |
|
|
|
154 |
def build_leaderboard_tab(elo_results_file, leaderboard_table_file):
|
155 |
if elo_results_file is None: # Do live update
|
156 |
md = "Loading ..."
|
@@ -233,6 +234,28 @@ Please note that you may see different orders from different ranking methods. Th
|
|
233 |
plot_4 = gr.Plot(p4, show_label=False)
|
234 |
return [md_1, plot_1, plot_2, plot_3, plot_4]
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
|
237 |
def build_demo(elo_results_file, leaderboard_table_file):
|
238 |
text_size = gr.themes.sizes.text_lg
|
@@ -240,6 +263,7 @@ def build_demo(elo_results_file, leaderboard_table_file):
|
|
240 |
with gr.Blocks(
|
241 |
title="Chatbot Arena Leaderboard",
|
242 |
theme=gr.themes.Base(text_size=text_size),
|
|
|
243 |
) as demo:
|
244 |
leader_components = build_leaderboard_tab(
|
245 |
elo_results_file, leaderboard_table_file
|
|
|
151 |
return [md0, plot_1, md1, md2, md3, md4]
|
152 |
|
153 |
|
154 |
+
|
155 |
def build_leaderboard_tab(elo_results_file, leaderboard_table_file):
|
156 |
if elo_results_file is None: # Do live update
|
157 |
md = "Loading ..."
|
|
|
234 |
plot_4 = gr.Plot(p4, show_label=False)
|
235 |
return [md_1, plot_1, plot_2, plot_3, plot_4]
|
236 |
|
237 |
+
block_css = """
|
238 |
+
#notice_markdown {
|
239 |
+
font-size: 104%
|
240 |
+
}
|
241 |
+
#notice_markdown th {
|
242 |
+
display: none;
|
243 |
+
}
|
244 |
+
#notice_markdown td {
|
245 |
+
padding-top: 6px;
|
246 |
+
padding-bottom: 6px;
|
247 |
+
}
|
248 |
+
#leaderboard_markdown {
|
249 |
+
font-size: 104%
|
250 |
+
}
|
251 |
+
#leaderboard_markdown td {
|
252 |
+
padding-top: 6px;
|
253 |
+
padding-bottom: 6px;
|
254 |
+
}
|
255 |
+
#leaderboard_dataframe td {
|
256 |
+
line-height: 0.1em;
|
257 |
+
}
|
258 |
+
"""
|
259 |
|
260 |
def build_demo(elo_results_file, leaderboard_table_file):
|
261 |
text_size = gr.themes.sizes.text_lg
|
|
|
263 |
with gr.Blocks(
|
264 |
title="Chatbot Arena Leaderboard",
|
265 |
theme=gr.themes.Base(text_size=text_size),
|
266 |
+
css=block_css,
|
267 |
) as demo:
|
268 |
leader_components = build_leaderboard_tab(
|
269 |
elo_results_file, leaderboard_table_file
|