Skip to content

Commit 4ff4d72

Browse files
committed
fix serve issue
1 parent 53221e0 commit 4ff4d72

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

waveform_editor/cli.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,13 @@ def launch_gui(file):
8484

8585
from waveform_editor.gui.main import WaveformEditorGui
8686

87-
try:
88-
app = WaveformEditorGui()
87+
def app():
88+
gui = WaveformEditorGui()
8989
if file is not None:
90-
app.load_yaml_from_file(Path(file))
90+
gui.load_yaml_from_file(Path(file))
91+
return gui
92+
93+
try:
9194
pn.serve(app, threaded=True)
9295
except Exception as e:
9396
logger.error(f"Failed to launch GUI: {e}")

0 commit comments

Comments
 (0)