加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
web.py 547 Bytes
一键复制 编辑 原始数据 按行查看 历史
import os
import sys
import typer
cli = typer.Typer()
@cli.command()
def launch(port: int = typer.Option(8080, "--port", "-p")) -> None:
"""Start a graphical UI server for the opyrator.
The UI is auto-generated from the input- and output-schema of the given function.
"""
# Add the current working directory to the sys path
# This is required to resolve the opyrator path
sys.path.append(os.getcwd())
from control.mkgui.base.ui.streamlit_ui import launch_ui
launch_ui(port)
if __name__ == "__main__":
cli()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化