BenDaouda commited on
Commit
314bad3
·
1 Parent(s): 8b20db9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -1,13 +1,15 @@
1
- import requests
2
  import gradio as gr
3
- from transformers import pipeline
4
 
5
- p = pipeline("BenDaouda/wav2vec2-large-xls-r-300m-wolof-test-coloab")
 
6
 
7
- def transcribe(audio):
8
- text = p(audio)["text"]
9
- return text
10
-
11
- iface = gr.Interface(fn=transcribe,inputs=gr.Audio(source="microphone", type="filepath"),outputs="text")
 
 
 
12
 
13
- iface.launch()
 
 
1
  import gradio as gr
 
2
 
3
+ title = "wolof_ASR"
4
+ description = "Wolof ASR"
5
 
6
+ iface = gr.Interface.load(
7
+ "BenDaouda/wav2vec2-large-xls-r-300m-wolof-test-coloab",
8
+ inputs=gr.Audio(source="microphone", type="filepath"),
9
+ outputs="text",
10
+ title=title,
11
+ description=description,
12
+ enable_queue=True
13
+ )
14
 
15
+ iface.launch()