Spaces:
Running
Running
binary-husky
commited on
Commit
•
36ff209
1
Parent(s):
3cf9c88
适配新版gradio的暗色主题
Browse files
main.py
CHANGED
@@ -187,7 +187,7 @@ def main():
|
|
187 |
def open():
|
188 |
time.sleep(2) # 打开浏览器
|
189 |
DARK_MODE, = get_conf('DARK_MODE')
|
190 |
-
if DARK_MODE: webbrowser.open_new_tab(f"http://localhost:{PORT}/?
|
191 |
else: webbrowser.open_new_tab(f"http://localhost:{PORT}")
|
192 |
threading.Thread(target=open, name="open-browser", daemon=True).start()
|
193 |
threading.Thread(target=auto_update, name="self-upgrade", daemon=True).start()
|
|
|
187 |
def open():
|
188 |
time.sleep(2) # 打开浏览器
|
189 |
DARK_MODE, = get_conf('DARK_MODE')
|
190 |
+
if DARK_MODE: webbrowser.open_new_tab(f"http://localhost:{PORT}/?__theme=dark")
|
191 |
else: webbrowser.open_new_tab(f"http://localhost:{PORT}")
|
192 |
threading.Thread(target=open, name="open-browser", daemon=True).start()
|
193 |
threading.Thread(target=auto_update, name="self-upgrade", daemon=True).start()
|