Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -56,15 +56,12 @@ with gr.Blocks() as transcriberUI:
|
|
56 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
57 |
|
58 |
text = pipe(inputs, batch_size=BATCH_SIZE, return_timestamps=True)["text"]
|
59 |
-
ask_question.visible = True
|
60 |
-
submit_question.visible = True
|
61 |
|
62 |
return text
|
63 |
|
64 |
def ask_question_callback(transcribe_output,ask_question):
|
65 |
if ask_question:
|
66 |
-
response = respond_to_question(
|
67 |
-
response_output.visible = True
|
68 |
response_output.value = response
|
69 |
else:
|
70 |
response_output.value = "No question asked"
|
|
|
56 |
raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
|
57 |
|
58 |
text = pipe(inputs, batch_size=BATCH_SIZE, return_timestamps=True)["text"]
|
|
|
|
|
59 |
|
60 |
return text
|
61 |
|
62 |
def ask_question_callback(transcribe_output,ask_question):
|
63 |
if ask_question:
|
64 |
+
response = respond_to_question(transcribe_output, ask_question)
|
|
|
65 |
response_output.value = response
|
66 |
else:
|
67 |
response_output.value = "No question asked"
|