File size: 575 Bytes
914e2c8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from transformers import pipeline
import gradio as gr
pipe = pipeline(model="SharatChandra/whisper-fine-banking-dataset") # change to "your-username/the-name-you-picked"
def transcribe(audio):
text = pipe(audio, generate_kwargs = {"task":"translate", "language":"english"})["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(type="filepath"),
outputs="text",
title="Whisper Medium Bank Domain",
description="Realtime demo for Banking Domain speech recognition using a fine-tuned Whisper medium model.",
)
iface.launch() |