"deploy/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "1ccb449f63e2e6ad93223a40cac3e828408c76e4"
Commit eb5191f9 authored by comfyanonymous's avatar comfyanonymous
Browse files

0.0.0.0 doesn't work on windows.

parent 076d2db6
...@@ -160,6 +160,8 @@ if __name__ == "__main__": ...@@ -160,6 +160,8 @@ if __name__ == "__main__":
if args.auto_launch: if args.auto_launch:
def startup_server(address, port): def startup_server(address, port):
import webbrowser import webbrowser
if os.name == 'nt' and address == '0.0.0.0':
address = '127.0.0.1'
webbrowser.open(f"http://{address}:{port}") webbrowser.open(f"http://{address}:{port}")
call_on_start = startup_server call_on_start = startup_server
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment