Skip to content

Commit 676f64f

Browse files
committed
fix serve issue
1 parent 292a2a4 commit 676f64f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

waveform_editor/cli.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,14 @@ 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))
91-
pn.serve(app, threaded=True)
90+
gui.load_yaml_from_file(Path(file))
91+
return gui
92+
93+
try:
94+
pn.serve(app)
9295
except Exception as e:
9396
logger.error(f"Failed to launch GUI: {e}")
9497

0 commit comments

Comments
 (0)