jpdiazpardo's picture
Update app.py
50c274f
raw
history blame
432 Bytes
import gradio as gr
from transformers import pipeline
import torch
device = "cuda:0" if torch.cuda.is_available() else "cpu"
pipeline = pipeline("automatic-speech-recognition",
model="openai/whisper-medium",
chunk_length_s=30,
device=device,
batch_size=8,
)
iface = gr.Interface.from_pipeline(pipeline, inputs= gr.inputs.Audio(source="upload", type="filepath"), title="Audio Transcription App")
iface.launch(debug=True)