Update app.py
Browse files
app.py
CHANGED
@@ -12,13 +12,16 @@ def greet(name):
|
|
12 |
#ds = load_dataset("language-and-voice-lab/samromur_asr",split='test')
|
13 |
|
14 |
|
15 |
-
|
16 |
#iface.launch()
|
17 |
|
18 |
def show_ex(exnum):
|
19 |
#return(ds['audio_id'][exnum])
|
20 |
return(exnum)
|
21 |
|
|
|
|
|
|
|
22 |
bl = gr.Blocks()
|
23 |
with bl:
|
24 |
text_input = gr.Textbox()
|
@@ -27,7 +30,7 @@ with bl:
|
|
27 |
#text_button.click(show_ex, inputs=text_input, outputs=text_output)
|
28 |
|
29 |
audio_file = gr.Audio(type="filepath")
|
30 |
-
text_button.click(
|
31 |
|
32 |
|
33 |
bl.launch()
|
|
|
12 |
#ds = load_dataset("language-and-voice-lab/samromur_asr",split='test')
|
13 |
|
14 |
|
15 |
+
api = gr.Interface.load("models/carlosdanielhernandezmena/wav2vec2-large-xlsr-53-icelandic-ep10-1000h")
|
16 |
#iface.launch()
|
17 |
|
18 |
def show_ex(exnum):
|
19 |
#return(ds['audio_id'][exnum])
|
20 |
return(exnum)
|
21 |
|
22 |
+
def recc(ul):
|
23 |
+
return(ul,api(ul))
|
24 |
+
|
25 |
bl = gr.Blocks()
|
26 |
with bl:
|
27 |
text_input = gr.Textbox()
|
|
|
30 |
#text_button.click(show_ex, inputs=text_input, outputs=text_output)
|
31 |
|
32 |
audio_file = gr.Audio(type="filepath")
|
33 |
+
text_button.click(recc, inputs=audio_file, outputs=text_output)
|
34 |
|
35 |
|
36 |
bl.launch()
|