weichiang commited on
Commit
425671a
β€’
1 Parent(s): c087c03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
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