Update app.py
Browse files
app.py
CHANGED
@@ -300,6 +300,13 @@ def build_demo(elo_results_file, leaderboard_table_file):
|
|
300 |
leader_components = build_leaderboard_tab(
|
301 |
elo_results_file, leaderboard_table_file
|
302 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
|
304 |
return demo
|
305 |
|
|
|
300 |
leader_components = build_leaderboard_tab(
|
301 |
elo_results_file, leaderboard_table_file
|
302 |
)
|
303 |
+
demo.load(_js="""
|
304 |
+
() => {
|
305 |
+
document.body.classList.toggle('dark');
|
306 |
+
document.body.classList.toggle('light');
|
307 |
+
document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)';
|
308 |
+
}
|
309 |
+
""")
|
310 |
|
311 |
return demo
|
312 |
|