bebechien commited on
Commit
5d576bb
·
verified ·
1 Parent(s): 4a1ace6

Fix issue with stop if queued

Browse files
Files changed (1) hide show
  1. ui.py +4 -2
ui.py CHANGED
@@ -66,7 +66,7 @@ class UIController:
66
  @staticmethod
67
  def stop_process(engine: FunctionGemmaEngine) -> str:
68
  engine.trigger_stop()
69
- return "Stopping..."
70
 
71
  @staticmethod
72
  def zip_model(engine: FunctionGemmaEngine) -> Any:
@@ -330,7 +330,9 @@ def build_interface() -> gr.Blocks:
330
  stop_btn.click(
331
  fn=UIController.stop_process,
332
  inputs=[engine_state],
333
- cancels=[train_run_event, eval_run_event]
 
 
334
  )
335
 
336
  reload_btn.click(lock_ui, outputs=action_buttons + [push_btn, zip_btn]).then(
 
66
  @staticmethod
67
  def stop_process(engine: FunctionGemmaEngine) -> str:
68
  engine.trigger_stop()
69
+ return
70
 
71
  @staticmethod
72
  def zip_model(engine: FunctionGemmaEngine) -> Any:
 
330
  stop_btn.click(
331
  fn=UIController.stop_process,
332
  inputs=[engine_state],
333
+ cancels=[train_run_event, eval_run_event],
334
+ outputs=None,
335
+ queue=False
336
  )
337
 
338
  reload_btn.click(lock_ui, outputs=action_buttons + [push_btn, zip_btn]).then(