Skip to content

Commit

Permalink
feat: app add root_path
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyi-Lin committed Sep 6, 2024
1 parent e48d366 commit 96a36e6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ def idphoto_inference(
argparser.add_argument(
"--host", type=str, default="127.0.0.1", help="The host of the server"
)
argparser.add_argument(
"--root_path",
type=str,
default=None,
help="The root path of the server, default is None (='/'), e.g. '/myapp'",
)

args = argparser.parse_args()

Expand Down Expand Up @@ -631,4 +637,10 @@ def change_image_kb(image_kb_option):
],
)

demo.launch(server_name=args.host, server_port=args.port)
demo.launch(
server_name=args.host,
server_port=args.port,
show_api=False,
favicon_path=os.path.join(root_dir, "assets/hivision_logo.png"),
root_path=args.root_path,
)

0 comments on commit 96a36e6

Please sign in to comment.