Spaces:
Runtime error
Runtime error
csukuangfj
commited on
Commit
·
2253b37
1
Parent(s):
333b2a2
add test data
Browse files
app.py
CHANGED
@@ -168,10 +168,13 @@ with demo:
|
|
168 |
upload_button = gr.Button("Submit for separation")
|
169 |
uploaded_html_info = gr.HTML(label="Info")
|
170 |
|
|
|
|
|
|
|
171 |
gr.Examples(
|
172 |
examples=["./yesterday-once-more-carpenters.mp3"],
|
173 |
inputs=[uploaded_file],
|
174 |
-
outputs=[
|
175 |
fn=process_uploaded_file,
|
176 |
)
|
177 |
|
@@ -186,10 +189,13 @@ with demo:
|
|
186 |
record_button = gr.Button("Submit for separation")
|
187 |
recorded_html_info = gr.HTML(label="Info")
|
188 |
|
|
|
|
|
|
|
189 |
gr.Examples(
|
190 |
examples=["./yesterday-once-more-carpenters.mp3"],
|
191 |
inputs=[microphone],
|
192 |
-
outputs=[
|
193 |
fn=process_microphone,
|
194 |
)
|
195 |
|
@@ -204,22 +210,25 @@ with demo:
|
|
204 |
url_button = gr.Button("Submit for separation")
|
205 |
url_html_info = gr.HTML(label="Info")
|
206 |
|
|
|
|
|
|
|
207 |
upload_button.click(
|
208 |
process_uploaded_file,
|
209 |
inputs=[uploaded_file],
|
210 |
-
outputs=[
|
211 |
)
|
212 |
|
213 |
record_button.click(
|
214 |
process_microphone,
|
215 |
inputs=[microphone],
|
216 |
-
outputs=[
|
217 |
)
|
218 |
|
219 |
url_button.click(
|
220 |
process_url,
|
221 |
inputs=[url_textbox],
|
222 |
-
outputs=[
|
223 |
)
|
224 |
|
225 |
torch.set_num_threads(1)
|
|
|
168 |
upload_button = gr.Button("Submit for separation")
|
169 |
uploaded_html_info = gr.HTML(label="Info")
|
170 |
|
171 |
+
uploaded_vocals = gradio.Audio()
|
172 |
+
uploaded_accompaniment = gradio.Audio()
|
173 |
+
|
174 |
gr.Examples(
|
175 |
examples=["./yesterday-once-more-carpenters.mp3"],
|
176 |
inputs=[uploaded_file],
|
177 |
+
outputs=[uploaded_vocals, uploaded_accompaniment, uploaded_html_info],
|
178 |
fn=process_uploaded_file,
|
179 |
)
|
180 |
|
|
|
189 |
record_button = gr.Button("Submit for separation")
|
190 |
recorded_html_info = gr.HTML(label="Info")
|
191 |
|
192 |
+
recorded_vocals = gradio.Audio()
|
193 |
+
recorded_accompaniment = gradio.Audio()
|
194 |
+
|
195 |
gr.Examples(
|
196 |
examples=["./yesterday-once-more-carpenters.mp3"],
|
197 |
inputs=[microphone],
|
198 |
+
outputs=[recorded_vocals, recorded_accompaniment, recorded_html_info],
|
199 |
fn=process_microphone,
|
200 |
)
|
201 |
|
|
|
210 |
url_button = gr.Button("Submit for separation")
|
211 |
url_html_info = gr.HTML(label="Info")
|
212 |
|
213 |
+
url_vocals = gradio.Audio()
|
214 |
+
url_accompaniment = gradio.Audio()
|
215 |
+
|
216 |
upload_button.click(
|
217 |
process_uploaded_file,
|
218 |
inputs=[uploaded_file],
|
219 |
+
outputs=[uploaded_vocals, uploaded_accompaniment, uploaded_html_info],
|
220 |
)
|
221 |
|
222 |
record_button.click(
|
223 |
process_microphone,
|
224 |
inputs=[microphone],
|
225 |
+
outputs=[recorded_vocals, recorded_accompaniment, recorded_html_info],
|
226 |
)
|
227 |
|
228 |
url_button.click(
|
229 |
process_url,
|
230 |
inputs=[url_textbox],
|
231 |
+
outputs=[url_vocals, url_accompaniment, url_html_info],
|
232 |
)
|
233 |
|
234 |
torch.set_num_threads(1)
|