Update app.py
Browse files
app.py
CHANGED
|
@@ -9,23 +9,26 @@ def greet(name):
|
|
| 9 |
#iface.launch()
|
| 10 |
|
| 11 |
#ds = load_dataset("language-and-voice-lab/samromur_asr",split='train',streaming=True)
|
| 12 |
-
ds = load_dataset("language-and-voice-lab/samromur_asr",split='test')
|
| 13 |
|
| 14 |
|
| 15 |
#iface = 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 |
-
|
| 21 |
|
| 22 |
bl = gr.Blocks()
|
| 23 |
with bl:
|
| 24 |
text_input = gr.Textbox()
|
| 25 |
text_output = gr.Textbox()
|
| 26 |
text_button = gr.Button("Run")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
text_button.click(show_ex, inputs=text_input, outputs=text_output)
|
| 29 |
|
| 30 |
bl.launch()
|
| 31 |
|
|
|
|
| 9 |
#iface.launch()
|
| 10 |
|
| 11 |
#ds = load_dataset("language-and-voice-lab/samromur_asr",split='train',streaming=True)
|
| 12 |
+
#ds = load_dataset("language-and-voice-lab/samromur_asr",split='test')
|
| 13 |
|
| 14 |
|
| 15 |
#iface = 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 |
bl = gr.Blocks()
|
| 23 |
with bl:
|
| 24 |
text_input = gr.Textbox()
|
| 25 |
text_output = gr.Textbox()
|
| 26 |
text_button = gr.Button("Run")
|
| 27 |
+
#text_button.click(show_ex, inputs=text_input, outputs=text_output)
|
| 28 |
+
|
| 29 |
+
audio_file = gr.Audio(type="filepath")
|
| 30 |
+
text_button.click(show_ex, inputs=audio_file, outputs=text_output)
|
| 31 |
|
|
|
|
| 32 |
|
| 33 |
bl.launch()
|
| 34 |
|