Spaces:
Sleeping
Sleeping
# import gradio as gr | |
# model_interface = gr.Interface.load("models/jonatasgrosman/wav2vec2-large-xlsr-53-arabic", wait=True) | |
# model_interface.launch() | |
# Use a pipeline as a high-level helper | |
from transformers import pipeline | |
import gradio as gr | |
pipe = pipeline(model="jonatasgrosman/wav2vec2-large-xlsr-53-arabic") # change to "your-username/the-name-you-picked" | |
def transcribe(audio): | |
text = pipe(audio)["text"] | |
return text | |
iface = gr.Interface( | |
fn=transcribe, | |
inputs=gr.Audio(source="upload", type="filepath"), | |
outputs="text", | |
) | |
iface.launch() |