import transformers | |
from transformers import pipeline | |
import gradio as gr | |
pipe = pipeline(model="mskov/whisper_esc50") | |
def transcribe(audio): | |
text = pipe(audio)["text"] | |
return text | |
iface = gr.Interface( | |
fn=transcribe, | |
inputs=gr.Audio(source="microphone", type="filepath"), | |
outputs="text", | |
title="Model Testing", | |
description="Testing model import.", | |
) | |
iface.launch() |