Daya7624's picture
Update app.py
ebc7880
raw
history blame contribute delete
No virus
517 Bytes
import gradio as gr
from transformers import pipeline
def transcribe(audio):
text = pipe(audio)["text"]
return text
model_variant_name="Daya7624/Fine_tune_large_v2_adam_8bit"
pipe = pipeline(model=model_variant_name, task="automatic-speech-recognition")
demo = gr.Interface(fn=transcribe, inputs= gr.inputs.Audio(label="Upload .wav file", type="filepath"), outputs="text")
# demo = gr.Interface(fn=transcribe, inputs=gr.Audio(source="microphone", type="filepath"), outputs="text")
demo.launch(debug=False)