Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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
|
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 |
|