Mahiruoshi commited on
Commit
44988be
1 Parent(s): 90c276b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -247,10 +247,7 @@ if __name__ == '__main__':
247
  )
248
  chatbot = gr.Chatbot(elem_id="History")
249
  with gr.Row():
250
- with gr.Column(scale=0.85):
251
- input1 = gr.TextArea(label="Text", value=example,lines = 1)
252
- with gr.Column(scale=0.15, min_width=0):
253
- btnVC = gr.Button("Send")
254
  output1 = gr.Audio(label="采样率22050")
255
  with gr.Accordion(label="Setting", open=False):
256
  input2 = gr.Dropdown(label="Language", choices=lan, value="自动", interactive=True)
@@ -266,6 +263,8 @@ if __name__ == '__main__':
266
  audio_input1 = gr.Checkbox(value=False, label="修改音频路径(live2d)")
267
  audio_input2 = gr.TextArea(label="音频路径",lines=1,value = '#参考 D:/app_develop/live2d_whole/2010002/sounds/temp.wav')
268
 
269
- btnVC.click(bot,[chatbot,input1],[chatbot]).then(tts_fn, inputs=[chatbot,api_input1,api_input2,audio_input1,audio_input2,audio_input3,input1,input2,input3,input4,input5,input6], outputs=[chatbot,output2,output1])
 
 
270
 
271
  app.launch()
 
247
  )
248
  chatbot = gr.Chatbot(elem_id="History")
249
  with gr.Row():
250
+ input1 = gr.TextArea(label="Enter text and press enter", value=example,lines = 1)
 
 
 
251
  output1 = gr.Audio(label="采样率22050")
252
  with gr.Accordion(label="Setting", open=False):
253
  input2 = gr.Dropdown(label="Language", choices=lan, value="自动", interactive=True)
 
263
  audio_input1 = gr.Checkbox(value=False, label="修改音频路径(live2d)")
264
  audio_input2 = gr.TextArea(label="音频路径",lines=1,value = '#参考 D:/app_develop/live2d_whole/2010002/sounds/temp.wav')
265
 
266
+ input1.submit(bot, inputs = [chatbot,input1], outputs = [chatbot]).then(
267
+ tts_fn, inputs=[chatbot,api_input1,api_input2,audio_input1,audio_input2,audio_input3,input1,input2,input3,input4,input5,input6], outputs=[chatbot,output2,output1]
268
+ )
269
 
270
  app.launch()