Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions waveform_editor/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def parse_linspace(ctx, param, value):

@cli.command("gui")
@click.argument("file", type=click.Path(exists=True, dir_okay=False), required=False)
def launch_gui(file):
@click.option(
"-p", "--port", type=int, default=0, help="Specify port to host application."
)
def launch_gui(file, port):
"""Launch the Waveform Editor GUI using Panel.

\b
Expand All @@ -88,7 +91,7 @@ def launch_gui(file):
app = WaveformEditorGui()
if file is not None:
app.load_yaml_from_file(Path(file))
pn.serve(app, threaded=True)
pn.serve(app, port=port, threaded=True)
except Exception as e:
logger.error(f"Failed to launch GUI: {e}")

Expand Down
Loading