Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -53,24 +53,12 @@ with gr.Blocks() as transcriberUI:
|
|
53 |
"""
|
54 |
)
|
55 |
|
56 |
-
|
57 |
-
fn=audio_transcribe,
|
58 |
-
inputs=gr.Audio(sources="upload", type="filepath", label="Audio file", format=["mp3","m4a"]),
|
59 |
-
outputs=[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)
|
73 |
submit_question = gr.Button("Submit question", visible=False)
|
|
|
74 |
clear_button = gr.ClearButton([transcribe,response_output,inp, ask_question])
|
75 |
|
76 |
def ask_question_callback(transcription,question):
|
|
|
53 |
"""
|
54 |
)
|
55 |
|
56 |
+
inp = gr.Audio(sources="upload", type="filepath", label="Audio file", format=["mp3","m4a"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
transcribe = gr.Textbox(label="Transcricao", show_label=True, show_copy_button=True)
|
58 |
ask_question = gr.Textbox(label="Ask a question", visible=False)
|
59 |
response_output = gr.Textbox(label="Response", visible=False)
|
60 |
submit_question = gr.Button("Submit question", visible=False)
|
61 |
+
submit_button = gr.Button(audio_transcribe,variant='primary', inputs=inp, outputs=[transcribe,ask_question,submit_question, response_output])
|
62 |
clear_button = gr.ClearButton([transcribe,response_output,inp, ask_question])
|
63 |
|
64 |
def ask_question_callback(transcription,question):
|