import gradio as gr from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="eolang/whisper-small-sw") def transcribe(audio): transcription = pipe(audio) return transcription['text'] gr.Interface(transcribe, gr.Audio(type="filepath"), gr.Textbox()).launch()