import fn import gradio as gr fn.load_model() with gr.Blocks() as demo: title = gr.Markdown('# audiosep') with gr.Row(): src_audio = gr.Audio(label="Source", sources="upload", interactive=True, type="filepath") dst_audio_1 = gr.Audio(label="Primary", interactive=False, type="filepath") dst_audio_2 = gr.Audio(label="Secondary", interactive=False, type="filepath") src_audio.change( fn=fn.run, inputs=[src_audio], outputs=[dst_audio_1, dst_audio_2], ) if __name__ == '__main__': demo.launch()