jvalero's picture
Create app.py
1b1e8e6 verified
raw
history blame
457 Bytes
from transformers import pipeline
model_id = "wav2vec2-base-vinyl_condition"
def get_vinyl_condition(filepath):
output = pipe(
filepath,
max_new_tokens=256,
chunk_length_s=30,
batch_size=8,
)
return [0]["label"]
import gradio as gr
demo = gr.Blocks()
file_transcribe = gr.Interface(
fn=get_vinyl_condition,
inputs=gr.Audio(sources="upload", type="filepath"),
outputs=gr.outputs.Textbox(),
)