Commit ·
8d43fbe
1
Parent(s): 3c75b9b
add more test data
Browse files31 unmodified lines323334353635363839404142434437383940414243444546474647484949505152136 unmodified lines18919019119219219319419514 unmodified lines21021121221321321421521616 unmodified lines23323423523623723823924031 unmodified lines
from separate import get_file, load_audio, load_model, separate
filename = get_file( "csukuangfj/spleeter-torch",examples = [ "yesterday-once-more-Carpenters.mp3", subfolder="test_wavs",)
shutil.copyfile(filename, "./yesterday-once-more-Carpenters.mp3")
filename = get_file( "csukuangfj/spleeter-torch", "das-beste-Silbermond.mp3", "hotel-in-california.mp3", "起风了.mp3",]
for name in examples: filename = get_file( "csukuangfj/spleeter-torch", name, subfolder="test_wavs",) subfolder="test_wavs", )
shutil.copyfile(filename, "./起风了.mp3") shutil.copyfile(filename, name)
def build_html_output(s: str, style: str = "result_item_success"):136 unmodified lines uploaded_accompaniment = gr.Audio(label="accompaniment")
gr.Examples( examples=["yesterday-once-more-Carpenters.mp3", "起风了.mp3"], examples=examples, inputs=[uploaded_file], outputs=[uploaded_vocals, uploaded_accompaniment, uploaded_html_info], fn=process_uploaded_file,14 unmodified lines recorded_accompaniment = gr.Audio(label="accompaniment")
gr.Examples( examples=["yesterday-once-more-Carpenters.mp3", "起风了.mp3"], examples=examples, inputs=[microphone], outputs=[recorded_vocals, recorded_accompaniment, recorded_html_info], fn=process_microphone,16 unmodified lines gr.Examples( examples=[ "https://huggingface.co/csukuangfj/spleeter-torch/resolve/main/test_wavs/yesterday-once-more-Carpenters.mp3", "https://huggingface.co/csukuangfj/spleeter-torch/resolve/main/test_wavs/das-beste-Silbermond.mp3", "https://huggingface.co/csukuangfj/spleeter-torch/resolve/main/test_wavs/hotel-in-california.mp3", ], inputs=[url_textbox], outputs=[url_vocals, url_accompaniment, recorded_html_info],app.py+16-14