Ubuntu commited on
Commit
1ad4435
1 Parent(s): 753aaf7

change function name

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -154,7 +154,7 @@ def transcribe_and_speak(audio, source_lang, target_lang, youtube_url=None):
154
  def check_password(password):
155
  return password == DEVELOPER_PASSWORD
156
 
157
- def user_interface(audio, source_lang, target_lang, youtube_url):
158
  transcription, translated_text, audio_url = transcribe_and_speak(audio, source_lang, target_lang, youtube_url)
159
  return transcription, translated_text, audio_url
160
 
@@ -194,7 +194,7 @@ with gr.Blocks() as demo:
194
  )
195
 
196
  user_button.click(
197
- fn=user_interface,
198
  inputs=[user_audio_input, user_source_lang, user_target_lang, user_youtube_url],
199
  outputs=[user_transcription_output, user_translation_output, user_audio_output]
200
  )
 
154
  def check_password(password):
155
  return password == DEVELOPER_PASSWORD
156
 
157
+ def run_speech_translation(audio, source_lang, target_lang, youtube_url):
158
  transcription, translated_text, audio_url = transcribe_and_speak(audio, source_lang, target_lang, youtube_url)
159
  return transcription, translated_text, audio_url
160
 
 
194
  )
195
 
196
  user_button.click(
197
+ fn=run_speech_translation,
198
  inputs=[user_audio_input, user_source_lang, user_target_lang, user_youtube_url],
199
  outputs=[user_transcription_output, user_translation_output, user_audio_output]
200
  )