Spaces:
Running
Running
Jude Khouja
commited on
Commit
·
4f2a78e
1
Parent(s):
9edff67
Only keep obfuscated score
Browse files- tabs/leaderboard.py +0 -17
- utils.py +1 -1
tabs/leaderboard.py
CHANGED
@@ -116,7 +116,6 @@ def filter_leaderboard(df, sort_by):
|
|
116 |
<th>Provider</th>
|
117 |
<th>Type</th>
|
118 |
<th>Exact match score (obfuscated questions)</th>
|
119 |
-
<th>Exact match score (all questions)</th>
|
120 |
</tr>
|
121 |
</thead>
|
122 |
<tbody>
|
@@ -130,7 +129,6 @@ def filter_leaderboard(df, sort_by):
|
|
130 |
<td class="vendor-cell">{row['Provider']}</td>
|
131 |
<td>{get_type_badge(row['Type'])}</td>
|
132 |
<td class="score-cell">{get_score_bar(row['Obfuscated score'])}</td>
|
133 |
-
<td class="score-cell">{get_score_bar_secondary(row['Baseline score'])}</td>
|
134 |
</tr>
|
135 |
"""
|
136 |
|
@@ -140,22 +138,7 @@ def filter_leaderboard(df, sort_by):
|
|
140 |
def create_leaderboard_tab(df, HEADER_CONTENT, CARDS):
|
141 |
gr.HTML(HEADER_CONTENT + CARDS)
|
142 |
|
143 |
-
# Filters row
|
144 |
-
with gr.Row(equal_height=True):
|
145 |
-
with gr.Column(scale=0.4):
|
146 |
-
sort_by = gr.Dropdown(
|
147 |
-
choices=["Score on obfuscated questions", "Score on all questions"],
|
148 |
-
value="Score on obfuscated questions",
|
149 |
-
label="Sort by",
|
150 |
-
)
|
151 |
-
|
152 |
# Content
|
153 |
output = gr.HTML()
|
154 |
|
155 |
-
sort_by.change(
|
156 |
-
fn=lambda s: filter_leaderboard(df, s),
|
157 |
-
inputs=[sort_by],
|
158 |
-
outputs=[output],
|
159 |
-
)
|
160 |
-
|
161 |
return output
|
|
|
116 |
<th>Provider</th>
|
117 |
<th>Type</th>
|
118 |
<th>Exact match score (obfuscated questions)</th>
|
|
|
119 |
</tr>
|
120 |
</thead>
|
121 |
<tbody>
|
|
|
129 |
<td class="vendor-cell">{row['Provider']}</td>
|
130 |
<td>{get_type_badge(row['Type'])}</td>
|
131 |
<td class="score-cell">{get_score_bar(row['Obfuscated score'])}</td>
|
|
|
132 |
</tr>
|
133 |
"""
|
134 |
|
|
|
138 |
def create_leaderboard_tab(df, HEADER_CONTENT, CARDS):
|
139 |
gr.HTML(HEADER_CONTENT + CARDS)
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
# Content
|
142 |
output = gr.HTML()
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
return output
|
utils.py
CHANGED
@@ -49,7 +49,7 @@ def get_score_bar(score):
|
|
49 |
background: var(--score-bg, rgba(255, 255, 255, 0.1));
|
50 |
border-radius: 4px;
|
51 |
overflow: hidden;
|
52 |
-
max-width:
|
53 |
">
|
54 |
<div style="
|
55 |
width: {width}%;
|
|
|
49 |
background: var(--score-bg, rgba(255, 255, 255, 0.1));
|
50 |
border-radius: 4px;
|
51 |
overflow: hidden;
|
52 |
+
max-width: 400px;
|
53 |
">
|
54 |
<div style="
|
55 |
width: {width}%;
|