Spaces:
Running
Running
Kang Suhyun
commited on
[#60] Remove persistent orange border from leaderboard (#62)
Browse filesThis change removes the orange border from the leaderboard so that it won't overlap with other elements on the page.
- app.py +9 -1
- leaderboard.py +4 -2
app.py
CHANGED
@@ -72,7 +72,15 @@ def scroll_to_bottom_js(elem_id):
|
|
72 |
"""
|
73 |
|
74 |
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
with gr.Row():
|
77 |
category_radio = gr.Radio(
|
78 |
[category.value for category in response.Category],
|
|
|
72 |
"""
|
73 |
|
74 |
|
75 |
+
# Removes the persistent orange border from the leaderboard, which
|
76 |
+
# appears due to the 'generating' class when using the 'every' parameter.
|
77 |
+
css = """
|
78 |
+
.leaderboard .generating {
|
79 |
+
border: none;
|
80 |
+
}
|
81 |
+
"""
|
82 |
+
|
83 |
+
with gr.Blocks(title="Arena", css=css) as app:
|
84 |
with gr.Row():
|
85 |
category_radio = gr.Radio(
|
86 |
[category.value for category in response.Category],
|
leaderboard.py
CHANGED
@@ -90,7 +90,8 @@ def build_leaderboard():
|
|
90 |
gr.Dataframe(headers=["Rank", "Model", "Elo rating"],
|
91 |
datatype=["number", "str", "number"],
|
92 |
value=load_summarization_elo_ratings,
|
93 |
-
every=LEADERBOARD_UPDATE_INTERVAL
|
|
|
94 |
gr.Markdown(LEADERBOARD_INFO)
|
95 |
|
96 |
# TODO(#9): Add language filter options.
|
@@ -98,5 +99,6 @@ def build_leaderboard():
|
|
98 |
gr.Dataframe(headers=["Rank", "Model", "Elo rating"],
|
99 |
datatype=["number", "str", "number"],
|
100 |
value=load_translation_elo_ratings,
|
101 |
-
every=LEADERBOARD_UPDATE_INTERVAL
|
|
|
102 |
gr.Markdown(LEADERBOARD_INFO)
|
|
|
90 |
gr.Dataframe(headers=["Rank", "Model", "Elo rating"],
|
91 |
datatype=["number", "str", "number"],
|
92 |
value=load_summarization_elo_ratings,
|
93 |
+
every=LEADERBOARD_UPDATE_INTERVAL,
|
94 |
+
elem_classes="leaderboard")
|
95 |
gr.Markdown(LEADERBOARD_INFO)
|
96 |
|
97 |
# TODO(#9): Add language filter options.
|
|
|
99 |
gr.Dataframe(headers=["Rank", "Model", "Elo rating"],
|
100 |
datatype=["number", "str", "number"],
|
101 |
value=load_translation_elo_ratings,
|
102 |
+
every=LEADERBOARD_UPDATE_INTERVAL,
|
103 |
+
elem_classes="leaderboard")
|
104 |
gr.Markdown(LEADERBOARD_INFO)
|