Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,21 @@ with gr.Blocks() as transcriberUI:
|
|
52 |
Ambiente disponivel 24x7. Running on ZeroGPU with openai/whisper-large-v3
|
53 |
"""
|
54 |
)
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|
@@ -67,7 +81,7 @@ with gr.Blocks() as transcriberUI:
|
|
67 |
|
68 |
return response
|
69 |
|
70 |
-
inp.upload(audio_transcribe, inputs=inp, outputs=[transcribe,ask_question,submit_question, response_output])
|
71 |
submit_question.click(ask_question_callback, outputs=[response_output], inputs=[transcribe, ask_question])
|
72 |
clear_button.click(hidden_ask_question,outputs=[ask_question,response_output,submit_question])
|
73 |
|
|
|
52 |
Ambiente disponivel 24x7. Running on ZeroGPU with openai/whisper-large-v3
|
53 |
"""
|
54 |
)
|
55 |
+
|
56 |
+
file_transcribe = gr.Interface(
|
57 |
+
fn=transcribe,
|
58 |
+
inputs=gr.Audio(sources="upload", type="filepath", label="Audio file", format=["mp3","m4a"]),
|
59 |
+
outputs=[audio_transcribe,ask_question,submit_question, response_output],
|
60 |
+
title="Chat with your Audio",
|
61 |
+
description=(
|
62 |
+
"Transcribe and Chat with your audio inputs with the click of a button! This prototype uses the"
|
63 |
+
f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files"
|
64 |
+
" of arbitrary length."
|
65 |
+
),
|
66 |
+
allow_flagging="never",
|
67 |
+
)
|
68 |
+
|
69 |
+
#inp = gr.Audio(sources="upload", type="filepath", label="Audio file", format=["mp3","m4a"])
|
70 |
transcribe = gr.Textbox(label="Transcricao", show_label=True, show_copy_button=True)
|
71 |
ask_question = gr.Textbox(label="Ask a question", visible=False)
|
72 |
response_output = gr.Textbox(label="Response", visible=False)
|
|
|
81 |
|
82 |
return response
|
83 |
|
84 |
+
#inp.upload(audio_transcribe, inputs=inp, outputs=[transcribe,ask_question,submit_question, response_output])
|
85 |
submit_question.click(ask_question_callback, outputs=[response_output], inputs=[transcribe, ask_question])
|
86 |
clear_button.click(hidden_ask_question,outputs=[ask_question,response_output,submit_question])
|
87 |
|