mirror of
https://github.com/babysor/MockingBird.git
synced 2024-11-21 01:13:57 +08:00
74a3fc97d0
Need readme
21 lines
547 B
Python
21 lines
547 B
Python
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() |