diff --git a/fastchat/serve/gradio_web_server_multi.py b/fastchat/serve/gradio_web_server_multi.py index 642380bdd..db5f80293 100644 --- a/fastchat/serve/gradio_web_server_multi.py +++ b/fastchat/serve/gradio_web_server_multi.py @@ -135,7 +135,13 @@ def build_demo(models, elo_results_file, leaderboard_table_file): + single_model_list + side_by_side_anony_list + side_by_side_named_list, - _js=load_js, + _js=""" + () => { + document.body.classList.toggle('dark'); + document.body.classList.toggle('light'); + document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)'; + } + """, ) return demo