Lcarrot commited on
Commit
604118d
·
verified ·
1 Parent(s): 3a9b59f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -103,10 +103,9 @@ def text_to_speech(text, output_file="output.wav"):
103
  def transcribe_long_form(filepath):
104
  if filepath is None:
105
  gr.Warning("No audio found, please retry.")
106
- return ""
107
-
108
- gradio_audio.append(filepath)
109
- ru_text = get_text_from_audio(gradio_audio[0])
110
  eng_text = translate_ru_to_en(ru_text)
111
  answer = ask_question_about_image(eng_text)
112
  ru_text_ans = translate_en_to_ru(answer)
 
103
  def transcribe_long_form(filepath):
104
  if filepath is None:
105
  gr.Warning("No audio found, please retry.")
106
+ return
107
+
108
+ ru_text = get_text_from_audio(filepath)
 
109
  eng_text = translate_ru_to_en(ru_text)
110
  answer = ask_question_about_image(eng_text)
111
  ru_text_ans = translate_en_to_ru(answer)