feat: revert adding audio tab
This commit is contained in:
parent
4f12bbb02b
commit
aed3240ccd
23
webui.py
23
webui.py
|
|
@ -860,24 +860,6 @@ with shared.gradio_root:
|
|||
refresh_files.click(refresh_files_clicked, [], refresh_files_output + lora_ctrls,
|
||||
queue=False, show_progress=False)
|
||||
|
||||
with gr.Tab(label='Audio'):
|
||||
play_notification = gr.Checkbox(label='Play notification after rendering', value=False)
|
||||
notification_file = 'notification.mp3'
|
||||
if os.path.exists(notification_file):
|
||||
notification = gr.State(value=notification_file)
|
||||
notification_input = gr.Audio(label='Notification', interactive=True, elem_id='audio_notification', visible=False, show_edit_button=False)
|
||||
|
||||
def play_notification_checked(r, notification):
|
||||
return gr.update(visible=r, value=notification if r else None)
|
||||
|
||||
def notification_input_changed(notification_input, notification):
|
||||
if notification_input:
|
||||
notification = notification_input
|
||||
return notification
|
||||
|
||||
play_notification.change(fn=play_notification_checked, inputs=[play_notification, notification], outputs=[notification_input], queue=False)
|
||||
notification_input.change(fn=notification_input_changed, inputs=[notification_input, notification], outputs=[notification], queue=False)
|
||||
|
||||
state_is_generating = gr.State(False)
|
||||
|
||||
load_data_outputs = [advanced_checkbox, image_number, prompt, negative_prompt, style_selections,
|
||||
|
|
@ -1045,6 +1027,11 @@ with shared.gradio_root:
|
|||
progress_html, progress_window, progress_gallery, gallery],
|
||||
queue=False)
|
||||
|
||||
for notification_file in ['notification.ogg', 'notification.mp3']:
|
||||
if os.path.exists(notification_file):
|
||||
gr.Audio(interactive=False, value=notification_file, elem_id='audio_notification', visible=False)
|
||||
break
|
||||
|
||||
def trigger_describe(mode, img):
|
||||
if mode == flags.desc_type_photo:
|
||||
from extras.interrogate import default_interrogator as default_interrogator_photo
|
||||
|
|
|
|||
Loading…
Reference in New Issue