Spaces:
Runtime error
Runtime error
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) |