Update app.py
Browse files
app.py
CHANGED
@@ -41,9 +41,9 @@ def recc(audio_file,model,processor):
|
|
41 |
|
42 |
|
43 |
def recis(audio_file):
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
|
48 |
def recfo(audio_file):
|
49 |
return recc(audio_file,model_fo,processor_fo)
|
@@ -69,9 +69,11 @@ with bl:
|
|
69 |
with gr.TabItem("Icelandic"):
|
70 |
with gr.Row():
|
71 |
audio_file = gr.Audio(type="filepath")
|
72 |
-
|
|
|
|
|
73 |
text_button = gr.Button("Recognise Icelandic")
|
74 |
-
text_button.click(recis, inputs=audio_file, outputs=
|
75 |
with gr.TabItem("Faroese"):
|
76 |
with gr.Row():
|
77 |
audio_file = gr.Audio(type="filepath")
|
|
|
41 |
|
42 |
|
43 |
def recis(audio_file):
|
44 |
+
single_output = recc(audio_file,model_is,processor_is)
|
45 |
+
chunk_output = pipe_is(audio_file, chunk_length_s=6)['text']
|
46 |
+
return (single_output, chunk_output)
|
47 |
|
48 |
def recfo(audio_file):
|
49 |
return recc(audio_file,model_fo,processor_fo)
|
|
|
69 |
with gr.TabItem("Icelandic"):
|
70 |
with gr.Row():
|
71 |
audio_file = gr.Audio(type="filepath")
|
72 |
+
with gr.Column():
|
73 |
+
whole_output = gr.Textbox(label="whole-file recognition")
|
74 |
+
chunk_output = gr.Textbox("recognition with chunking")
|
75 |
text_button = gr.Button("Recognise Icelandic")
|
76 |
+
text_button.click(recis, inputs=audio_file, outputs=[whole_output,chunk_output])
|
77 |
with gr.TabItem("Faroese"):
|
78 |
with gr.Row():
|
79 |
audio_file = gr.Audio(type="filepath")
|