avfranco commited on
Commit
42907f8
1 Parent(s): db0a348

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -35,12 +35,13 @@ def respond_to_question_llama(transcript, question):
35
  @spaces.GPU
36
  def audio_transcribe(inputs):
37
  status=True
 
 
38
  if inputs is None:
39
- raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
40
- text=""
41
- status=False
42
  else:
43
  text = pipe(inputs, batch_size=BATCH_SIZE, return_timestamps=True)['text']
 
44
 
45
  return [text, gr.Textbox(visible=status),gr.Textbox(visible=status),gr.Textbox(visible=status)]
46
 
 
35
  @spaces.GPU
36
  def audio_transcribe(inputs):
37
  status=True
38
+ text="Arquivo de audio nao carregado!"
39
+ status=False
40
  if inputs is None:
41
+ raise gr.Error("No audio file submitted! Please upload an audio file before submitting your request.")
 
 
42
  else:
43
  text = pipe(inputs, batch_size=BATCH_SIZE, return_timestamps=True)['text']
44
+ status = True
45
 
46
  return [text, gr.Textbox(visible=status),gr.Textbox(visible=status),gr.Textbox(visible=status)]
47