broadfield commited on
Commit
37f7a38
·
verified ·
1 Parent(s): 1015d4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,7 +44,7 @@ def generate(prompt,history,max_new_tokens,seed):
44
  output += response.token.text
45
  #print(output)
46
  #yield output
47
- def search(inp,voice,length,noise,width,sen_pause):
48
  yield from pp.stream_tts(inp,voice,length,noise,width,sen_pause)
49
 
50
  with gr.Blocks() as iface:
@@ -66,7 +66,7 @@ with gr.Blocks() as iface:
66
  sen_pause=gr.Slider(label="Sentence Pause", minimum=0.1, maximum=10.0, value=1)
67
  upd_btn=gr.Button("Update")
68
  upd_btn.click(pp.load_mod,names,None)
69
- stt.change(tts,[stt,names,length,noise,width,se_pause],aud)
70
  #sub_b = submit_b.click(generate, [msg,chatbot],[msg,chatbot,sumbox,sum_out_box,hist_out_box])
71
  #sub_e = msg.submit(generate, [msg, chatbot], [msg, chatbot,sumbox,sum_out_box,hist_out_box])
72
  sub_b = submit_b.click(generate, [msg,chatbot],[chatbot,stt])
 
44
  output += response.token.text
45
  #print(output)
46
  #yield output
47
+ def tts(inp,voice,length,noise,width,sen_pause):
48
  yield from pp.stream_tts(inp,voice,length,noise,width,sen_pause)
49
 
50
  with gr.Blocks() as iface:
 
66
  sen_pause=gr.Slider(label="Sentence Pause", minimum=0.1, maximum=10.0, value=1)
67
  upd_btn=gr.Button("Update")
68
  upd_btn.click(pp.load_mod,names,None)
69
+ stt.change(tts,[stt,names,length,noise,width,se_pause],aud,trigger_mode='once')
70
  #sub_b = submit_b.click(generate, [msg,chatbot],[msg,chatbot,sumbox,sum_out_box,hist_out_box])
71
  #sub_e = msg.submit(generate, [msg, chatbot], [msg, chatbot,sumbox,sum_out_box,hist_out_box])
72
  sub_b = submit_b.click(generate, [msg,chatbot],[chatbot,stt])