1
0
Fork 0

fix(api): get admin token from correct server object

This commit is contained in:
Sean Sube 2023-04-22 13:16:14 -05:00
parent 4ac25f0650
commit 6fecb1ee8b
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ if __name__ == '__main__':
# create the server and load the config
from onnx_web.main import main
server, app, pool = main()
context, app, pool = main()
# launch the image workers
print("starting image workers")
@ -39,7 +39,7 @@ if __name__ == '__main__':
# launch the user's web browser
print("opening web browser")
url = "http://127.0.0.1:5000"
webbrowser.open_new_tab(f"{url}?api={url}&token={server.admin_token}")
webbrowser.open_new_tab(f"{url}?api={url}&token={context.admin_token}")
# wait for enter and exit
input("press enter to quit")