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(), )