from transformers import pipeline import gradio as gr modelo = pipeline("automatic-speech-recognition", "facebook/wav2vec2-large-xlsr-53-spanish") def transcribe(audio): text = modelo(audio)["text"] return text # Crear la interfaz de Gradio gr.Interface( fn=transcribe, inputs=gr.Audio(type="filepath"), outputs="text" ).launch()