Spaces:
Runtime error
Runtime error
File size: 518 Bytes
127df02 6856dbf dcd263b 127df02 6856dbf 127df02 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from transformers import pipeline
import gradio as gr
# Explicitly set the task
pipe = pipeline("automatic-speech-recognition", model="nambn0321/ASR_french_3")
def transcribe(audio):
text = pipe(audio)["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(type="filepath"), # Removed source="microphone"
outputs="text",
title="Whisper Small French",
description="Realtime demo for French speech recognition using a fine-tuned Whisper small model.",
)
iface.launch()
|