add --gradio-queue option to enable gradio queue
This commit is contained in:
parent
424cefe118
commit
63b824376c
@ -100,6 +100,8 @@ parser.add_argument("--cors-allow-origins-regex", type=str, help="Allowed CORS o
|
|||||||
parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requires --tls-certfile to fully function", default=None)
|
parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requires --tls-certfile to fully function", default=None)
|
||||||
parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, requires --tls-keyfile to fully function", default=None)
|
parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, requires --tls-keyfile to fully function", default=None)
|
||||||
parser.add_argument("--server-name", type=str, help="Sets hostname of server", default=None)
|
parser.add_argument("--server-name", type=str, help="Sets hostname of server", default=None)
|
||||||
|
parser.add_argument("--gradio-queue", action='store_true', help="Uses gradio queue; experimental option; breaks restart UI button")
|
||||||
|
|
||||||
|
|
||||||
script_loading.preload_extensions(extensions.extensions_dir, parser)
|
script_loading.preload_extensions(extensions.extensions_dir, parser)
|
||||||
script_loading.preload_extensions(extensions.extensions_builtin_dir, parser)
|
script_loading.preload_extensions(extensions.extensions_builtin_dir, parser)
|
||||||
|
3
webui.py
3
webui.py
@ -169,6 +169,9 @@ def webui():
|
|||||||
|
|
||||||
shared.demo = modules.ui.create_ui()
|
shared.demo = modules.ui.create_ui()
|
||||||
|
|
||||||
|
if cmd_opts.gradio_queue:
|
||||||
|
shared.demo.queue(64)
|
||||||
|
|
||||||
app, local_url, share_url = shared.demo.launch(
|
app, local_url, share_url = shared.demo.launch(
|
||||||
share=cmd_opts.share,
|
share=cmd_opts.share,
|
||||||
server_name=server_name,
|
server_name=server_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user