csukuangfj
commited on
Commit
•
8d43fbe
1
Parent(s):
3c75b9b
add more test data
Browse files
app.py
CHANGED
@@ -32,21 +32,21 @@ from pydub import AudioSegment
|
|
32 |
|
33 |
from separate import get_file, load_audio, load_model, separate
|
34 |
|
35 |
-
|
36 |
-
"csukuangfj/spleeter-torch",
|
37 |
"yesterday-once-more-Carpenters.mp3",
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
shutil.copyfile(filename, "./yesterday-once-more-Carpenters.mp3")
|
42 |
-
|
43 |
-
filename = get_file(
|
44 |
-
"csukuangfj/spleeter-torch",
|
45 |
"起风了.mp3",
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
shutil.copyfile(filename,
|
50 |
|
51 |
|
52 |
def build_html_output(s: str, style: str = "result_item_success"):
|
@@ -189,7 +189,7 @@ with demo:
|
|
189 |
uploaded_accompaniment = gr.Audio(label="accompaniment")
|
190 |
|
191 |
gr.Examples(
|
192 |
-
examples=
|
193 |
inputs=[uploaded_file],
|
194 |
outputs=[uploaded_vocals, uploaded_accompaniment, uploaded_html_info],
|
195 |
fn=process_uploaded_file,
|
@@ -210,7 +210,7 @@ with demo:
|
|
210 |
recorded_accompaniment = gr.Audio(label="accompaniment")
|
211 |
|
212 |
gr.Examples(
|
213 |
-
examples=
|
214 |
inputs=[microphone],
|
215 |
outputs=[recorded_vocals, recorded_accompaniment, recorded_html_info],
|
216 |
fn=process_microphone,
|
@@ -233,6 +233,8 @@ with demo:
|
|
233 |
gr.Examples(
|
234 |
examples=[
|
235 |
"https://huggingface.co/csukuangfj/spleeter-torch/resolve/main/test_wavs/yesterday-once-more-Carpenters.mp3",
|
|
|
|
|
236 |
],
|
237 |
inputs=[url_textbox],
|
238 |
outputs=[url_vocals, url_accompaniment, recorded_html_info],
|
|
|
32 |
|
33 |
from separate import get_file, load_audio, load_model, separate
|
34 |
|
35 |
+
examples = [
|
|
|
36 |
"yesterday-once-more-Carpenters.mp3",
|
37 |
+
"das-beste-Silbermond.mp3",
|
38 |
+
"hotel-in-california.mp3",
|
|
|
|
|
|
|
|
|
|
|
39 |
"起风了.mp3",
|
40 |
+
]
|
41 |
+
|
42 |
+
for name in examples:
|
43 |
+
filename = get_file(
|
44 |
+
"csukuangfj/spleeter-torch",
|
45 |
+
name,
|
46 |
+
subfolder="test_wavs",
|
47 |
+
)
|
48 |
|
49 |
+
shutil.copyfile(filename, name)
|
50 |
|
51 |
|
52 |
def build_html_output(s: str, style: str = "result_item_success"):
|
|
|
189 |
uploaded_accompaniment = gr.Audio(label="accompaniment")
|
190 |
|
191 |
gr.Examples(
|
192 |
+
examples=examples,
|
193 |
inputs=[uploaded_file],
|
194 |
outputs=[uploaded_vocals, uploaded_accompaniment, uploaded_html_info],
|
195 |
fn=process_uploaded_file,
|
|
|
210 |
recorded_accompaniment = gr.Audio(label="accompaniment")
|
211 |
|
212 |
gr.Examples(
|
213 |
+
examples=examples,
|
214 |
inputs=[microphone],
|
215 |
outputs=[recorded_vocals, recorded_accompaniment, recorded_html_info],
|
216 |
fn=process_microphone,
|
|
|
233 |
gr.Examples(
|
234 |
examples=[
|
235 |
"https://huggingface.co/csukuangfj/spleeter-torch/resolve/main/test_wavs/yesterday-once-more-Carpenters.mp3",
|
236 |
+
"https://huggingface.co/csukuangfj/spleeter-torch/resolve/main/test_wavs/das-beste-Silbermond.mp3",
|
237 |
+
"https://huggingface.co/csukuangfj/spleeter-torch/resolve/main/test_wavs/hotel-in-california.mp3",
|
238 |
],
|
239 |
inputs=[url_textbox],
|
240 |
outputs=[url_vocals, url_accompaniment, recorded_html_info],
|