import gradio as gr import os from pathlib import Path os.system("midi_ddsp_download_model_weights") def inference(audio): os.system("midi_ddsp_synthesize --midi_path "+audio.name) return Path(audio.name).stem+"/0_violin.wav" title = "Demucs" description = "Gradio demo for Demucs: Music Source Separation in the Waveform Domain. To use it, simply upload your audio, or click one of the examples to load them. Read more at the links below." article = "
Music Source Separation in the Waveform Domain | Github Repo
" examples=[['test.mp3']] gr.Interface( inference, gr.inputs.File(type="file", label="Input"), [gr.outputs.Audio(type="file", label="Output")], title=title, description=description, article=article, examples=examples, enable_queue=True ).launch(debug=True)