Neprox commited on
Commit
20d4cb1
1 Parent(s): 44d12e1

small change

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -104,10 +104,11 @@ def translate(audio, url, seconds_max, target_lang):
104
  return text
105
 
106
  else:
 
107
  text = "[Transcription]\n"
108
- text += pipe(audio)["text"]
109
- text += f"\n[Translation to {target_lang}]\n"
110
- text += get_translation(text, target_lang)
111
 
112
  return text
113
 
 
104
  return text
105
 
106
  else:
107
+ transcribed_text = pipe(audio)["text"]
108
  text = "[Transcription]\n"
109
+ text += f"{transcribed_text}\n"
110
+ text += f"[Translation to {target_lang}]\n"
111
+ text += get_translation(transcribed_text, target_lang)
112
 
113
  return text
114