Spaces:
Runtime error
Runtime error
csukuangfj
commited on
Commit
•
0d436b4
1
Parent(s):
4c029aa
rename
Browse files
app.py
CHANGED
@@ -40,6 +40,14 @@ filename = get_file(
|
|
40 |
|
41 |
shutil.copyfile(filename, "./yesterday-once-more-Carpenters.mp3")
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
def build_html_output(s: str, style: str = "result_item_success"):
|
45 |
return f"""
|
@@ -181,7 +189,7 @@ with demo:
|
|
181 |
uploaded_accompaniment = gr.Audio(label="accompaniment")
|
182 |
|
183 |
gr.Examples(
|
184 |
-
examples=["./yesterday-once-more-Carpenters.mp3"],
|
185 |
inputs=[uploaded_file],
|
186 |
outputs=[uploaded_vocals, uploaded_accompaniment, uploaded_html_info],
|
187 |
fn=process_uploaded_file,
|
@@ -202,7 +210,7 @@ with demo:
|
|
202 |
recorded_accompaniment = gr.Audio(label="accompaniment")
|
203 |
|
204 |
gr.Examples(
|
205 |
-
examples=["./yesterday-once-more-Carpenters.mp3"],
|
206 |
inputs=[microphone],
|
207 |
outputs=[recorded_vocals, recorded_accompaniment, recorded_html_info],
|
208 |
fn=process_microphone,
|
@@ -222,6 +230,16 @@ with demo:
|
|
222 |
url_vocals = gr.Audio(label="vocals")
|
223 |
url_accompaniment = gr.Audio(label="accompaniment")
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
upload_button.click(
|
226 |
process_uploaded_file,
|
227 |
inputs=[uploaded_file],
|
|
|
40 |
|
41 |
shutil.copyfile(filename, "./yesterday-once-more-Carpenters.mp3")
|
42 |
|
43 |
+
filename = get_file(
|
44 |
+
"csukuangfj/spleeter-torch",
|
45 |
+
"起风了.mp3",
|
46 |
+
subfolder="test_wavs",
|
47 |
+
)
|
48 |
+
|
49 |
+
shutil.copyfile(filename, "./起风了.mp3")
|
50 |
+
|
51 |
|
52 |
def build_html_output(s: str, style: str = "result_item_success"):
|
53 |
return f"""
|
|
|
189 |
uploaded_accompaniment = gr.Audio(label="accompaniment")
|
190 |
|
191 |
gr.Examples(
|
192 |
+
examples=["./yesterday-once-more-Carpenters.mp3", "起风了.mp3"],
|
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=["./yesterday-once-more-Carpenters.mp3", "起风了.mp3"],
|
214 |
inputs=[microphone],
|
215 |
outputs=[recorded_vocals, recorded_accompaniment, recorded_html_info],
|
216 |
fn=process_microphone,
|
|
|
230 |
url_vocals = gr.Audio(label="vocals")
|
231 |
url_accompaniment = gr.Audio(label="accompaniment")
|
232 |
|
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/起风了.mp3",
|
237 |
+
],
|
238 |
+
inputs=[url_textbox],
|
239 |
+
outputs=[url_vocals, url_accompaniment, recorded_html_info],
|
240 |
+
fn=process_url,
|
241 |
+
)
|
242 |
+
|
243 |
upload_button.click(
|
244 |
process_uploaded_file,
|
245 |
inputs=[uploaded_file],
|