适配新版gradio的暗色主题

这个提交包含在:
binary-husky
2023-05-07 14:13:57 +08:00
提交者 GitHub
父节点 3cf9c88891
当前提交 36ff2092d7

查看文件

@@ -187,7 +187,7 @@ def main():
def open():
time.sleep(2) # 打开浏览器
DARK_MODE, = get_conf('DARK_MODE')
if DARK_MODE: webbrowser.open_new_tab(f"http://localhost:{PORT}/?__dark-theme=true")
if DARK_MODE: webbrowser.open_new_tab(f"http://localhost:{PORT}/?__theme=dark")
else: webbrowser.open_new_tab(f"http://localhost:{PORT}")
threading.Thread(target=open, name="open-browser", daemon=True).start()
threading.Thread(target=auto_update, name="self-upgrade", daemon=True).start()