Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ demo = gr.Blocks()
|
|
| 9 |
# now ho to make the demo take long time audio
|
| 10 |
def transcribe_long_form(filepath):
|
| 11 |
if filepath is None:
|
| 12 |
-
gr.Warning("No audio found, please
|
| 13 |
return ""
|
| 14 |
output = asr(
|
| 15 |
filepath,
|
|
@@ -23,7 +23,7 @@ mic_transcribe = gr.Interface(
|
|
| 23 |
fn=transcribe_long_form,
|
| 24 |
inputs=gr.Audio(sources="microphone",
|
| 25 |
type="filepath"),
|
| 26 |
-
outputs=gr.Textbox(label="
|
| 27 |
lines=3),
|
| 28 |
allow_flagging="never")
|
| 29 |
|
|
@@ -31,7 +31,7 @@ file_transcribe = gr.Interface(
|
|
| 31 |
fn=transcribe_long_form,
|
| 32 |
inputs=gr.Audio(sources="upload",
|
| 33 |
type="filepath"),
|
| 34 |
-
outputs=gr.Textbox(label="
|
| 35 |
lines=3),
|
| 36 |
allow_flagging="never",
|
| 37 |
)
|
|
@@ -43,4 +43,4 @@ with demo:
|
|
| 43 |
["Transcribe Microphone",
|
| 44 |
"Transcribe Audio File"])
|
| 45 |
|
| 46 |
-
demo.launch()
|
|
|
|
| 9 |
# now ho to make the demo take long time audio
|
| 10 |
def transcribe_long_form(filepath):
|
| 11 |
if filepath is None:
|
| 12 |
+
gr.Warning("No audio found, please submit or record again")
|
| 13 |
return ""
|
| 14 |
output = asr(
|
| 15 |
filepath,
|
|
|
|
| 23 |
fn=transcribe_long_form,
|
| 24 |
inputs=gr.Audio(sources="microphone",
|
| 25 |
type="filepath"),
|
| 26 |
+
outputs=gr.Textbox(label="The record lyrics",
|
| 27 |
lines=3),
|
| 28 |
allow_flagging="never")
|
| 29 |
|
|
|
|
| 31 |
fn=transcribe_long_form,
|
| 32 |
inputs=gr.Audio(sources="upload",
|
| 33 |
type="filepath"),
|
| 34 |
+
outputs=gr.Textbox(label="The record lyrics",
|
| 35 |
lines=3),
|
| 36 |
allow_flagging="never",
|
| 37 |
)
|
|
|
|
| 43 |
["Transcribe Microphone",
|
| 44 |
"Transcribe Audio File"])
|
| 45 |
|
| 46 |
+
demo.launch(share=True)
|