Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -34,13 +34,15 @@ def respond_to_question_llama(transcript, question):
|
|
34 |
|
35 |
@spaces.GPU
|
36 |
def audio_transcribe(inputs):
|
|
|
37 |
if inputs is None:
|
38 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
39 |
-
|
|
|
|
|
|
|
40 |
|
41 |
-
text =
|
42 |
-
|
43 |
-
return [text, gr.Textbox(visible=True),gr.Textbox(visible=True),gr.Textbox(visible=True)]
|
44 |
|
45 |
def hidden_ask_question():
|
46 |
return [gr.Textbox(visible=False),gr.Textbox(visible=False),gr.Textbox(visible=False)]
|
|
|
34 |
|
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 |
|
47 |
def hidden_ask_question():
|
48 |
return [gr.Textbox(visible=False),gr.Textbox(visible=False),gr.Textbox(visible=False)]
|