mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
Add --listen-host launch option (#1122)
This commit is contained in:
parent
403be8a27f
commit
9d66957207
@ -265,6 +265,7 @@ Optionally, you can use the following command-line flags:
|
|||||||
| Flag | Description |
|
| Flag | Description |
|
||||||
|---------------------------------------|-------------|
|
|---------------------------------------|-------------|
|
||||||
| `--listen` | Make the web UI reachable from your local network. |
|
| `--listen` | Make the web UI reachable from your local network. |
|
||||||
|
| `--listen-host LISTEN_HOST` | The hostname that the server will use. |
|
||||||
| `--listen-port LISTEN_PORT` | The listening port that the server will use. |
|
| `--listen-port LISTEN_PORT` | The listening port that the server will use. |
|
||||||
| `--share` | Create a public URL. This is useful for running the web UI on Google Colab or similar. |
|
| `--share` | Create a public URL. This is useful for running the web UI on Google Colab or similar. |
|
||||||
| `--auto-launch` | Open the web UI in the default browser upon launch. |
|
| `--auto-launch` | Open the web UI in the default browser upon launch. |
|
||||||
|
@ -136,6 +136,7 @@ parser.add_argument('--rwkv-cuda-on', action='store_true', help='RWKV: Compile t
|
|||||||
|
|
||||||
# Gradio
|
# Gradio
|
||||||
parser.add_argument('--listen', action='store_true', help='Make the web UI reachable from your local network.')
|
parser.add_argument('--listen', action='store_true', help='Make the web UI reachable from your local network.')
|
||||||
|
parser.add_argument('--listen-host', type=str, help='The hostname that the server will use.')
|
||||||
parser.add_argument('--listen-port', type=int, help='The listening port that the server will use.')
|
parser.add_argument('--listen-port', type=int, help='The listening port that the server will use.')
|
||||||
parser.add_argument('--share', action='store_true', help='Create a public URL. This is useful for running the web UI on Google Colab or similar.')
|
parser.add_argument('--share', action='store_true', help='Create a public URL. This is useful for running the web UI on Google Colab or similar.')
|
||||||
parser.add_argument('--auto-launch', action='store_true', default=False, help='Open the web UI in the default browser upon launch.')
|
parser.add_argument('--auto-launch', action='store_true', default=False, help='Open the web UI in the default browser upon launch.')
|
||||||
|
@ -819,7 +819,7 @@ def create_interface():
|
|||||||
# Launch the interface
|
# Launch the interface
|
||||||
shared.gradio['interface'].queue()
|
shared.gradio['interface'].queue()
|
||||||
if shared.args.listen:
|
if shared.args.listen:
|
||||||
shared.gradio['interface'].launch(prevent_thread_lock=True, share=shared.args.share, server_name='0.0.0.0', server_port=shared.args.listen_port, inbrowser=shared.args.auto_launch, auth=auth)
|
shared.gradio['interface'].launch(prevent_thread_lock=True, share=shared.args.share, server_name=shared.args.listen_host or '0.0.0.0', server_port=shared.args.listen_port, inbrowser=shared.args.auto_launch, auth=auth)
|
||||||
else:
|
else:
|
||||||
shared.gradio['interface'].launch(prevent_thread_lock=True, share=shared.args.share, server_port=shared.args.listen_port, inbrowser=shared.args.auto_launch, auth=auth)
|
shared.gradio['interface'].launch(prevent_thread_lock=True, share=shared.args.share, server_port=shared.args.listen_port, inbrowser=shared.args.auto_launch, auth=auth)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user