From aa535d55d98de27561d394cd539002cae7a14c1c Mon Sep 17 00:00:00 2001 From: Catalyzzt <78272915+Catalyzzt@users.noreply.github.com> Date: Sun, 31 Jan 2021 16:39:47 -0500 Subject: [PATCH] Open browser window with localhost:[port] I noticed that the "--browser" flag does not function correctly and that, when the browser window is opened with the host IP, it returns an error. Changing the URL to localhost:[port] does the trick. --- style_transfer/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style_transfer/cli.py b/style_transfer/cli.py index c7644d9..6739a3e 100644 --- a/style_transfer/cli.py +++ b/style_transfer/cli.py @@ -246,7 +246,7 @@ def arg_info(arg): callback = Callback(st, args, image_type=image_type, web_interface=web_interface) atexit.register(callback.close) - url = f'http://{args.host}:{args.port}/' + url = f'http://localhost:{args.port}/' if args.web: if args.browser: webbrowser.get(args.browser).open(url)