cli失败的问题

This commit is contained in:
glide-the 2023-06-12 20:35:29 +08:00
parent ff3fc48a31
commit 7e89f5b69b
1 changed files with 2 additions and 3 deletions

5
cli.py
View File

@ -64,7 +64,7 @@ def start_api(ip, port):
# 然后在cli.py里初始化 # 然后在cli.py里初始化
@start.command(name="cli", context_settings=dict(help_option_names=['-h', '--help'])) @start.command(name="cli", context_settings=dict(help_option_names=['-h', '--help']))
def start_cli(info): def start_cli():
print("通过cli.py调用cli_demo...") print("通过cli.py调用cli_demo...")
from models import shared from models import shared
@ -79,8 +79,7 @@ def start_cli(info):
# 故建议不要通过以上命令启动webui,将下述语句注释掉 # 故建议不要通过以上命令启动webui,将下述语句注释掉
@start.command(name="webui", context_settings=dict(help_option_names=['-h', '--help'])) @start.command(name="webui", context_settings=dict(help_option_names=['-h', '--help']))
@click.option('-i', '--info', default="start client", show_default=True, type=str) def start_webui():
def start_webui(info):
print(info) print(info)
import webui import webui