Spaces:
Sleeping
Sleeping
File size: 379 Bytes
9890498 d9f05c7 9890498 d9f05c7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
from transformers import pipeline
pipe = pipeline("audio-classification",
model="juliensimon/wav2vec2-conformer-rel-pos-large-finetuned-speech-commands")
def predict(audio):
return pipe(audio)[0]["label"]
demo = gr.Interface(
title='Audio commands datection'
fn=predict,
inputs='audio',
outputs='text',
)
demo.launch()
|