Adityadn commited on
Commit
636e6fb
·
verified ·
1 Parent(s): 5f8ce6b

Update webui.py

Browse files
Files changed (1) hide show
  1. webui.py +4 -4
webui.py CHANGED
@@ -645,6 +645,10 @@ with shared.gradio_root:
645
  # Inisialisasi currentTask menjadi None saat diluncurkan
646
  currentTask = None
647
 
 
 
 
 
648
  # Saat tombol Generate diklik
649
  generate_button.click(lambda: (
650
  gr.update(visible=True, interactive=True),
@@ -665,10 +669,6 @@ with shared.gradio_root:
665
  .then(fn=update_history_link, outputs=history_link) \
666
  .then(fn=lambda: None, _js='playNotification').then(fn=lambda: None, _js='refresh_grid_delayed')
667
 
668
- def set_current_task():
669
- global currentTask
670
- currentTask = gr.State(worker.AsyncTask(args=[]))
671
-
672
  for notification_file in ['notification.ogg', 'notification.mp3']:
673
  if os.path.exists(notification_file):
674
  gr.Audio(interactive=False, value=notification_file, elem_id='audio_notification', visible=False)
 
645
  # Inisialisasi currentTask menjadi None saat diluncurkan
646
  currentTask = None
647
 
648
+ def set_current_task():
649
+ global currentTask
650
+ currentTask = gr.State(worker.AsyncTask(args=[]))
651
+
652
  # Saat tombol Generate diklik
653
  generate_button.click(lambda: (
654
  gr.update(visible=True, interactive=True),
 
669
  .then(fn=update_history_link, outputs=history_link) \
670
  .then(fn=lambda: None, _js='playNotification').then(fn=lambda: None, _js='refresh_grid_delayed')
671
 
 
 
 
 
672
  for notification_file in ['notification.ogg', 'notification.mp3']:
673
  if os.path.exists(notification_file):
674
  gr.Audio(interactive=False, value=notification_file, elem_id='audio_notification', visible=False)