SharatChandra's picture
Create app.py
914e2c8
raw
history blame
575 Bytes
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()