暗色模式适配新版gradio

This commit is contained in:
binary-husky 2023-05-07 14:12:37 +08:00 committed by GitHub
parent 78045001f2
commit 3cf9c88891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,7 +183,7 @@ def main():
import threading, webbrowser, time
print(f"如果浏览器没有自动打开请复制并转到以下URL")
print(f"\t(亮色主题): http://localhost:{PORT}")
print(f"\t(暗色主题): http://localhost:{PORT}/?__dark-theme=true")
print(f"\t(暗色主题): http://localhost:{PORT}/?__theme=dark")
def open():
time.sleep(2) # 打开浏览器
DARK_MODE, = get_conf('DARK_MODE')