Spaces:
Running
Running
Commit
·
a86996f
1
Parent(s):
f88579f
add: force dark mode
Browse files
main.py
CHANGED
|
@@ -214,7 +214,7 @@ def make_overview_leaderboard(lbs: [LBContainer]):
|
|
| 214 |
# Merge
|
| 215 |
full_df = full_df.merge(df, how="left", on="Model", validate="1:1")
|
| 216 |
|
| 217 |
-
medal_colors = ["#
|
| 218 |
|
| 219 |
# Highlight function
|
| 220 |
def highlight_top3(col):
|
|
@@ -400,7 +400,17 @@ def main():
|
|
| 400 |
border-radius: 2px;
|
| 401 |
}
|
| 402 |
"""
|
| 403 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
with demo:
|
| 405 |
gr.HTML(TITLE)
|
| 406 |
|
|
|
|
| 214 |
# Merge
|
| 215 |
full_df = full_df.merge(df, how="left", on="Model", validate="1:1")
|
| 216 |
|
| 217 |
+
medal_colors = ["#998A00", "#808080", "#8C5520"]
|
| 218 |
|
| 219 |
# Highlight function
|
| 220 |
def highlight_top3(col):
|
|
|
|
| 400 |
border-radius: 2px;
|
| 401 |
}
|
| 402 |
"""
|
| 403 |
+
js_func = """
|
| 404 |
+
function refresh() {
|
| 405 |
+
const url = new URL(window.location);
|
| 406 |
+
|
| 407 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
| 408 |
+
url.searchParams.set('__theme', 'dark');
|
| 409 |
+
window.location.href = url.href;
|
| 410 |
+
}
|
| 411 |
+
}
|
| 412 |
+
"""
|
| 413 |
+
demo = gr.Blocks(css=css, js=js_func, title="TabArena")
|
| 414 |
with demo:
|
| 415 |
gr.HTML(TITLE)
|
| 416 |
|