Spaces:
Runtime error
Runtime error
Commit
·
1de54db
1
Parent(s):
dc2754c
correct queue
Browse files
app.py
CHANGED
@@ -1838,7 +1838,7 @@ with gr.Blocks() as demo:
|
|
1838 |
# inf4 = inputtext.submit(chathmi4, [inputtext, chatbot], [inputtext, chatbot, submit_button, stop_button])
|
1839 |
''' open ai | new'''
|
1840 |
inf4 = inputtext.submit(chathmi4, [inputtext, chatbot], [inputtext, chatbot, submit_button, stop_button]).\
|
1841 |
-
success(playsound1, None, voice_output, queue=
|
1842 |
# success(ClearAudio, None, voice_output)
|
1843 |
|
1844 |
''' Test '''
|
@@ -1846,23 +1846,23 @@ with gr.Blocks() as demo:
|
|
1846 |
# success(playsound1, None, voice_output)
|
1847 |
|
1848 |
inf3 = submit_button.click(chathmi3, [inputtext, chatbot], [inputtext, chatbot]).\
|
1849 |
-
success(HMI_Runing, None, [submit_button, stop_button], queue=
|
1850 |
-
success(playsound1, None, voice_output, queue=
|
1851 |
-
success(HMI_Wait, None, [submit_button, stop_button], queue=
|
1852 |
# success(ClearAudio, None, voice_output)
|
1853 |
|
1854 |
# inf2 = inputtext.submit(display_input, [inputtext, chatbot], chatbot).\
|
1855 |
# then(Inference_Agent, chatbot, [inputtext, chatbot])
|
1856 |
stop_button.click(read_logs, None, logs, cancels=[inf4,inf3]).\
|
1857 |
-
then(HMI_Wait, None, [submit_button, stop_button], queue=
|
1858 |
# stop_button.click(read_logs, None, logs, cancels=[inf2])
|
1859 |
upload_button.upload(func_upload_file, [upload_button, chatbot], chatbot)
|
1860 |
sum1 = summary_file_button.upload(Summary_upload_file, [summary_file_button, chatbot], chatbot)
|
1861 |
agentchoice.change(SetAgent, agentchoice, None)
|
1862 |
frash_logs.click(read_logs, None, logs)
|
1863 |
-
voice_input.stop_recording(SingleTalk, [voice_input, chatbot], [voice_input, voice_output, chatbot], queue=
|
1864 |
-
success(Text2Sound_HMI,None,None, queue=
|
1865 |
-
success(playsound1, None, voice_output, queue=
|
1866 |
# success(HMI_Wait, None, [submit_button, stop_button]).\
|
1867 |
# success(ClearAudio, None, voice_output)
|
1868 |
clear_button.click(clearall, None, [chatbot, submit_button, stop_button], voice_output, cancels=[inf4,inf3,sum1])
|
@@ -1874,7 +1874,7 @@ with gr.Blocks() as demo:
|
|
1874 |
# voice_output.play(clear_voice, None, None)
|
1875 |
|
1876 |
# demo.load(read_logs, None, logs, every=1)
|
1877 |
-
demo.load(UpdateChatbot, chatbot, chatbot, queue=
|
1878 |
# load(UpdateChatbot, chatbot, chatbot, every=5)
|
1879 |
|
1880 |
|
|
|
1838 |
# inf4 = inputtext.submit(chathmi4, [inputtext, chatbot], [inputtext, chatbot, submit_button, stop_button])
|
1839 |
''' open ai | new'''
|
1840 |
inf4 = inputtext.submit(chathmi4, [inputtext, chatbot], [inputtext, chatbot, submit_button, stop_button]).\
|
1841 |
+
success(playsound1, None, voice_output, queue=True)#.\
|
1842 |
# success(ClearAudio, None, voice_output)
|
1843 |
|
1844 |
''' Test '''
|
|
|
1846 |
# success(playsound1, None, voice_output)
|
1847 |
|
1848 |
inf3 = submit_button.click(chathmi3, [inputtext, chatbot], [inputtext, chatbot]).\
|
1849 |
+
success(HMI_Runing, None, [submit_button, stop_button], queue=True).\
|
1850 |
+
success(playsound1, None, voice_output, queue=True).\
|
1851 |
+
success(HMI_Wait, None, [submit_button, stop_button], queue=True)#.\
|
1852 |
# success(ClearAudio, None, voice_output)
|
1853 |
|
1854 |
# inf2 = inputtext.submit(display_input, [inputtext, chatbot], chatbot).\
|
1855 |
# then(Inference_Agent, chatbot, [inputtext, chatbot])
|
1856 |
stop_button.click(read_logs, None, logs, cancels=[inf4,inf3]).\
|
1857 |
+
then(HMI_Wait, None, [submit_button, stop_button], queue=True)
|
1858 |
# stop_button.click(read_logs, None, logs, cancels=[inf2])
|
1859 |
upload_button.upload(func_upload_file, [upload_button, chatbot], chatbot)
|
1860 |
sum1 = summary_file_button.upload(Summary_upload_file, [summary_file_button, chatbot], chatbot)
|
1861 |
agentchoice.change(SetAgent, agentchoice, None)
|
1862 |
frash_logs.click(read_logs, None, logs)
|
1863 |
+
voice_input.stop_recording(SingleTalk, [voice_input, chatbot], [voice_input, voice_output, chatbot], queue=True).\
|
1864 |
+
success(Text2Sound_HMI,None,None, queue=True).\
|
1865 |
+
success(playsound1, None, voice_output, queue=True) #.\
|
1866 |
# success(HMI_Wait, None, [submit_button, stop_button]).\
|
1867 |
# success(ClearAudio, None, voice_output)
|
1868 |
clear_button.click(clearall, None, [chatbot, submit_button, stop_button], voice_output, cancels=[inf4,inf3,sum1])
|
|
|
1874 |
# voice_output.play(clear_voice, None, None)
|
1875 |
|
1876 |
# demo.load(read_logs, None, logs, every=1)
|
1877 |
+
demo.load(UpdateChatbot, chatbot, chatbot, queue=True)
|
1878 |
# load(UpdateChatbot, chatbot, chatbot, every=5)
|
1879 |
|
1880 |
|