Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse filesadded gr.Audio
app.py
CHANGED
@@ -37,7 +37,7 @@ 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 |
-
text = pipe(inputs, batch_size=BATCH_SIZE, return_timestamps=True)[
|
41 |
|
42 |
return [text, gr.Textbox(visible=True),gr.Textbox(visible=True),gr.Textbox(visible=True)]
|
43 |
|
@@ -52,7 +52,7 @@ with gr.Blocks() as transcriberUI:
|
|
52 |
Ambiente disponivel 24x7. Running on ZeroGPU with openai/whisper-large-v3
|
53 |
"""
|
54 |
)
|
55 |
-
inp = gr.
|
56 |
transcribe = gr.Textbox(label="Transcricao", show_label=True, show_copy_button=True)
|
57 |
ask_question = gr.Textbox(label="Ask a question", visible=False)
|
58 |
response_output = gr.Textbox(label="Response", visible=False)
|
|
|
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 |
+
text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": "transcribe"}, return_timestamps=True)['text']
|
41 |
|
42 |
return [text, gr.Textbox(visible=True),gr.Textbox(visible=True),gr.Textbox(visible=True)]
|
43 |
|
|
|
52 |
Ambiente disponivel 24x7. Running on ZeroGPU with openai/whisper-large-v3
|
53 |
"""
|
54 |
)
|
55 |
+
inp = gr.Audio(sources="upload", type="filepath", label="Audio file", format=["mp3","m4a"])
|
56 |
transcribe = gr.Textbox(label="Transcricao", show_label=True, show_copy_button=True)
|
57 |
ask_question = gr.Textbox(label="Ask a question", visible=False)
|
58 |
response_output = gr.Textbox(label="Response", visible=False)
|