chibop commited on
Commit
891df10
·
verified ·
1 Parent(s): b53265a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. chat.py +4 -4
chat.py CHANGED
@@ -92,16 +92,16 @@ with gr.Blocks(title="Paitient Sim", css=css) as demo:
92
  mic = gr.Microphone(type="filepath", format="mp3", editable=False, waveform_options={"show_controls": False}, visible=False)
93
  thread = gr.State(start_thread)
94
  audio_html = gr.HTML(visible=False)
95
- msg.submit(user, [msg, mic, chatbot, thread], [msg, chatbot], queue=False).then(
96
  bot, [chatbot, thread], chatbot
97
  ).then(
98
  speak, chatbot, audio_html
99
  )
100
- mic.stop_recording(user, [msg, mic, chatbot, thread], [msg, chatbot], queue=False).then(
101
- lambda:None, None, mic, queue=False).then(
102
  bot, [chatbot, thread], chatbot).then(
103
  speak, chatbot, audio_html
104
  )
105
 
106
- demo.queue()
107
  demo.launch(auth=login)
 
92
  mic = gr.Microphone(type="filepath", format="mp3", editable=False, waveform_options={"show_controls": False}, visible=False)
93
  thread = gr.State(start_thread)
94
  audio_html = gr.HTML(visible=False)
95
+ msg.submit(user, [msg, mic, chatbot, thread], [msg, chatbot]).then(
96
  bot, [chatbot, thread], chatbot
97
  ).then(
98
  speak, chatbot, audio_html
99
  )
100
+ mic.stop_recording(user, [msg, mic, chatbot, thread], [msg, chatbot]).then(
101
+ lambda:None, None, mic).then(
102
  bot, [chatbot, thread], chatbot).then(
103
  speak, chatbot, audio_html
104
  )
105
 
106
+ #demo.queue()
107
  demo.launch(auth=login)