Skip to content
Draft
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
9 changes: 6 additions & 3 deletions waveform_editor/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ def launch_gui(file):

from waveform_editor.gui.main import WaveformEditorGui

try:
app = WaveformEditorGui()
def app():
gui = WaveformEditorGui()
if file is not None:
app.load_yaml_from_file(Path(file))
gui.load_yaml_from_file(Path(file))
return gui

try:
pn.serve(app, threaded=True)
except Exception as e:
logger.error(f"Failed to launch GUI: {e}")
Expand Down
Loading