适配新版gradio的暗色主题
This commit is contained in:
parent
3cf9c88891
commit
36ff2092d7
2
main.py
2
main.py
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user