Yusin commited on
Commit
5497f7b
1 Parent(s): 0f64e46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -41,6 +41,7 @@ def chat_hf(audio, custom_token, language):
41
  gpt_response = """Sorry, I'm quite busy right now, but please try again later :)"""
42
 
43
  # to voice
 
44
  if language == 'cn' or 'jp':
45
  voice_out = cn_a_jp(gpt_response)
46
  else:
@@ -117,7 +118,8 @@ with gr.Blocks() as blocks:
117
  with gr.Column():
118
  text1 = gr.Textbox(label="Speech to Text")
119
  text2 = gr.Textbox(label="ChatGPT Response")
120
- audio = gr.Audio(label="Output", interactive=False)
 
121
  #gr.Markdown(info)
122
  #gr.Markdown("<center>"
123
  # +f'<img src={badge} alt="visitors badge"/>'
@@ -129,7 +131,7 @@ with gr.Blocks() as blocks:
129
  [audio_file, custom_token, radio],
130
  [text1, text2, audio],
131
  )
132
- #radio.change(lambda lang: CoquiTTS.langs[lang]["sentence"], radio, text2)
133
 
134
 
135
  blocks.launch(debug=True)
 
41
  gpt_response = """Sorry, I'm quite busy right now, but please try again later :)"""
42
 
43
  # to voice
44
+ print(language)
45
  if language == 'cn' or 'jp':
46
  voice_out = cn_a_jp(gpt_response)
47
  else:
 
118
  with gr.Column():
119
  text1 = gr.Textbox(label="Speech to Text")
120
  text2 = gr.Textbox(label="ChatGPT Response")
121
+ audio = gr.Audio(label="Output")
122
+ #audio = gr.Audio(label="Output", interactive=False)
123
  #gr.Markdown(info)
124
  #gr.Markdown("<center>"
125
  # +f'<img src={badge} alt="visitors badge"/>'
 
131
  [audio_file, custom_token, radio],
132
  [text1, text2, audio],
133
  )
134
+ radio.change(lambda lang: CoquiTTS.langs[lang]["sentence"], radio, text2)
135
 
136
 
137
  blocks.launch(debug=True)