from transformers import pipeline import gradio as gr import os #add auth_token = os.environ.get("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") or True pipe = pipeline(model="jonatasgrosman/wav2vec2-large-xlsr-53-arabic",use_auth_token=auth_token) 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()