Hugomartinezg commited on
Commit
20a7298
·
1 Parent(s): 3fc00f2

ejemplo con ajuste 2

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -1,4 +1,12 @@
1
- gr.Interface(
 
 
 
 
 
 
 
 
2
  fn=transcribe,
3
  inputs=gr.Audio(type="filepath"),
4
  outputs=["textbox"]
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+ modelo = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-spanish")
5
+
6
+ def transcribe(audio):
7
+ text = modelo(audio)["text"]
8
+ return text
9
+ gr.Interface(
10
  fn=transcribe,
11
  inputs=gr.Audio(type="filepath"),
12
  outputs=["textbox"]