broadfield commited on
Commit
b024e83
·
verified ·
1 Parent(s): a5a9cdb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -50,11 +50,11 @@ def load_mod(model):
50
 
51
  with gr.Blocks() as iface:
52
  stt=gr.State()
53
- gr.HTML("""""")
54
  aud=gr.Audio(streaming=True,autoplay=True)
55
  #chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
56
  chatbot=gr.Chatbot()
57
- msg = gr.Textbox()
58
  with gr.Group():
59
  with gr.Row():
60
  submit_b = gr.Button()
@@ -69,7 +69,7 @@ with gr.Blocks() as iface:
69
  upd_btn=gr.Button("Update")
70
 
71
  names.change(load_mod,names,msg)
72
- sub_b = submit_b.click(generate, [msg,chatbot],[chatbot,stt]).then(tts,[stt,names,length,noise,width,sen_pause],aud)
73
- sub_e = msg.submit(generate, [msg, chatbot], aud)
74
  stop_b.click(None,None,None, cancels=[sub_b,sub_e])
75
  iface.queue(default_concurrency_limit=10).launch()
 
50
 
51
  with gr.Blocks() as iface:
52
  stt=gr.State()
53
+ msg = gr.HTML("""""")
54
  aud=gr.Audio(streaming=True,autoplay=True)
55
  #chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
56
  chatbot=gr.Chatbot()
57
+ prompt = gr.Textbox()
58
  with gr.Group():
59
  with gr.Row():
60
  submit_b = gr.Button()
 
69
  upd_btn=gr.Button("Update")
70
 
71
  names.change(load_mod,names,msg)
72
+ sub_b = submit_b.click(generate, [prompt,chatbot],[chatbot,stt]).then(tts,[stt,names,length,noise,width,sen_pause],aud)
73
+ sub_e = msg.submit(generate, [prompt, chatbot], aud)
74
  stop_b.click(None,None,None, cancels=[sub_b,sub_e])
75
  iface.queue(default_concurrency_limit=10).launch()