Added notification.mp3 support

pull/606/head
Thomas Young 2023-04-28 17:06:22 -05:00
parent 3b6effe4a9
commit 64176bf77d
2 changed files with 4 additions and 0 deletions

1
.gitignore vendored
View File

@ -27,6 +27,7 @@ venv
/*.bat
/*.sh
/*.txt
/notification.mp3
!webui.bat
!webui.sh

View File

@ -1387,6 +1387,9 @@ def create_ui():
with gr.TabItem(label, id=ifid, elem_id='tab_' + ifid):
interface.render()
if os.path.exists(os.path.join(script_path, "notification.mp3")):
audio_notification = gr.Audio(interactive=False, value=os.path.join(script_path, "notification.mp3"), elem_id="audio_notification", visible=False)
text_settings = gr.Textbox(elem_id="settings_json", value=lambda: opts.dumpjson(), visible=False)
settings_submit.click(
fn=wrap_gradio_call(run_settings, extra_outputs=[gr.update()]),