Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
21 |
value = lambda : None,
|
22 |
interactive = True
|
23 |
)
|
24 |
-
with gr.Accordion("Advanced settings"
|
25 |
with gr.Group():
|
26 |
with gr.Row():
|
27 |
roformer_segment_size = gr.Slider(
|
@@ -109,13 +109,13 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
109 |
roformer_stem1 = gr.Audio(
|
110 |
show_download_button = True,
|
111 |
interactive = False,
|
112 |
-
label =
|
113 |
type = "filepath"
|
114 |
)
|
115 |
roformer_stem2 = gr.Audio(
|
116 |
show_download_button = True,
|
117 |
interactive = False,
|
118 |
-
label =
|
119 |
type = "filepath"
|
120 |
)
|
121 |
|
@@ -124,32 +124,32 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
124 |
with gr.TabItem("MDX23C"):
|
125 |
with gr.Row():
|
126 |
mdx23c_model = gr.Dropdown(
|
127 |
-
label =
|
128 |
choices = mdx23c_models,
|
129 |
value = lambda : None,
|
130 |
interactive = True
|
131 |
)
|
132 |
mdx23c_output_format = gr.Dropdown(
|
133 |
-
label =
|
134 |
choices = output_format,
|
135 |
value = lambda : None,
|
136 |
interactive = True
|
137 |
)
|
138 |
-
with gr.Accordion(
|
139 |
with gr.Group():
|
140 |
with gr.Row():
|
141 |
mdx23c_segment_size = gr.Slider(
|
142 |
minimum = 32,
|
143 |
maximum = 4000,
|
144 |
step = 32,
|
145 |
-
label =
|
146 |
-
info =
|
147 |
value = 256,
|
148 |
interactive = True
|
149 |
)
|
150 |
mdx23c_override_segment_size = gr.Checkbox(
|
151 |
-
label =
|
152 |
-
info =
|
153 |
value = False,
|
154 |
interactive = True
|
155 |
)
|
@@ -158,14 +158,14 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
158 |
minimum = 2,
|
159 |
maximum = 50,
|
160 |
step = 1,
|
161 |
-
label =
|
162 |
-
info =
|
163 |
value = 8,
|
164 |
interactive = True
|
165 |
)
|
166 |
mdx23c_batch_size = gr.Slider(
|
167 |
-
label =
|
168 |
-
info =
|
169 |
minimum = 1,
|
170 |
maximum = 16,
|
171 |
step = 1,
|
@@ -174,8 +174,8 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
174 |
)
|
175 |
with gr.Row():
|
176 |
mdx23c_normalization_threshold = gr.Slider(
|
177 |
-
label =
|
178 |
-
info =
|
179 |
minimum = 0.1,
|
180 |
maximum = 1,
|
181 |
step = 0.1,
|
@@ -183,8 +183,8 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
183 |
interactive = True
|
184 |
)
|
185 |
mdx23c_amplification_threshold = gr.Slider(
|
186 |
-
label =
|
187 |
-
info =
|
188 |
minimum = 0.1,
|
189 |
maximum = 1,
|
190 |
step = 0.1,
|
@@ -193,22 +193,22 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
193 |
)
|
194 |
with gr.Row():
|
195 |
mdx23c_audio = gr.Audio(
|
196 |
-
label =
|
197 |
type = "filepath",
|
198 |
interactive = True
|
199 |
)
|
200 |
-
with gr.Accordion(
|
201 |
with gr.Row():
|
202 |
mdx23c_link = gr.Textbox(
|
203 |
-
label =
|
204 |
-
placeholder =
|
205 |
interactive = True
|
206 |
)
|
207 |
with gr.Row():
|
208 |
-
gr.Markdown(
|
209 |
with gr.Row():
|
210 |
mdx23c_download_button = gr.Button(
|
211 |
-
|
212 |
variant = "primary"
|
213 |
)
|
214 |
|
@@ -216,18 +216,18 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
216 |
|
217 |
|
218 |
with gr.Row():
|
219 |
-
mdx23c_button = gr.Button(
|
220 |
with gr.Row():
|
221 |
mdx23c_stem1 = gr.Audio(
|
222 |
show_download_button = True,
|
223 |
interactive = False,
|
224 |
-
label =
|
225 |
type = "filepath"
|
226 |
)
|
227 |
mdx23c_stem2 = gr.Audio(
|
228 |
show_download_button = True,
|
229 |
interactive = False,
|
230 |
-
label =
|
231 |
type = "filepath"
|
232 |
)
|
233 |
|
@@ -236,23 +236,23 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
236 |
with gr.TabItem("MDX-NET"):
|
237 |
with gr.Row():
|
238 |
mdxnet_model = gr.Dropdown(
|
239 |
-
label =
|
240 |
choices = mdxnet_models,
|
241 |
value = lambda : None,
|
242 |
interactive = True
|
243 |
)
|
244 |
mdxnet_output_format = gr.Dropdown(
|
245 |
-
label =
|
246 |
choices = output_format,
|
247 |
value = lambda : None,
|
248 |
interactive = True
|
249 |
)
|
250 |
-
with gr.Accordion(
|
251 |
with gr.Group():
|
252 |
with gr.Row():
|
253 |
mdxnet_hop_length = gr.Slider(
|
254 |
-
label =
|
255 |
-
info =
|
256 |
minimum = 32,
|
257 |
maximum = 2048,
|
258 |
step = 32,
|
@@ -263,21 +263,21 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
263 |
minimum = 32,
|
264 |
maximum = 4000,
|
265 |
step = 32,
|
266 |
-
label =
|
267 |
-
info =
|
268 |
value = 256,
|
269 |
interactive = True
|
270 |
)
|
271 |
mdxnet_denoise = gr.Checkbox(
|
272 |
-
label =
|
273 |
-
info =
|
274 |
value = True,
|
275 |
interactive = True
|
276 |
)
|
277 |
with gr.Row():
|
278 |
mdxnet_overlap = gr.Slider(
|
279 |
-
label =
|
280 |
-
info =
|
281 |
minimum = 0.001,
|
282 |
maximum = 0.999,
|
283 |
step = 0.001,
|
@@ -285,8 +285,8 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
285 |
interactive = True
|
286 |
)
|
287 |
mdxnet_batch_size = gr.Slider(
|
288 |
-
label =
|
289 |
-
info =
|
290 |
minimum = 1,
|
291 |
maximum = 16,
|
292 |
step = 1,
|
@@ -295,8 +295,8 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
295 |
)
|
296 |
with gr.Row():
|
297 |
mdxnet_normalization_threshold = gr.Slider(
|
298 |
-
label =
|
299 |
-
info =
|
300 |
minimum = 0.1,
|
301 |
maximum = 1,
|
302 |
step = 0.1,
|
@@ -304,8 +304,8 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
304 |
interactive = True
|
305 |
)
|
306 |
mdxnet_amplification_threshold = gr.Slider(
|
307 |
-
label =
|
308 |
-
info =
|
309 |
minimum = 0.1,
|
310 |
maximum = 1,
|
311 |
step = 0.1,
|
@@ -314,15 +314,15 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
314 |
)
|
315 |
with gr.Row():
|
316 |
mdxnet_audio = gr.Audio(
|
317 |
-
label =
|
318 |
type = "filepath",
|
319 |
interactive = True
|
320 |
)
|
321 |
-
with gr.Accordion(
|
322 |
with gr.Row():
|
323 |
mdxnet_link = gr.Textbox(
|
324 |
-
label =
|
325 |
-
placeholder =
|
326 |
interactive = True
|
327 |
)
|
328 |
with gr.Row():
|
@@ -372,8 +372,8 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
372 |
with gr.Group():
|
373 |
with gr.Row():
|
374 |
vrarch_window_size = gr.Slider(
|
375 |
-
label =
|
376 |
-
info =
|
377 |
minimum=320,
|
378 |
maximum=1024,
|
379 |
step=32,
|
@@ -455,7 +455,7 @@ with gr.Blocks(theme ="hev832/applio", title = "🎵 Audio Separator UI 🎵") a
|
|
455 |
type = "filepath",
|
456 |
interactive = True
|
457 |
)
|
458 |
-
with gr.Accordion("Separation by link"
|
459 |
with gr.Row():
|
460 |
vrarch_link = gr.Textbox(
|
461 |
label = "Link",
|
|
|
21 |
value = lambda : None,
|
22 |
interactive = True
|
23 |
)
|
24 |
+
with gr.Accordion("Advanced settings", open = False):
|
25 |
with gr.Group():
|
26 |
with gr.Row():
|
27 |
roformer_segment_size = gr.Slider(
|
|
|
109 |
roformer_stem1 = gr.Audio(
|
110 |
show_download_button = True,
|
111 |
interactive = False,
|
112 |
+
label = "Stem 1",
|
113 |
type = "filepath"
|
114 |
)
|
115 |
roformer_stem2 = gr.Audio(
|
116 |
show_download_button = True,
|
117 |
interactive = False,
|
118 |
+
label = "Stem 2",
|
119 |
type = "filepath"
|
120 |
)
|
121 |
|
|
|
124 |
with gr.TabItem("MDX23C"):
|
125 |
with gr.Row():
|
126 |
mdx23c_model = gr.Dropdown(
|
127 |
+
label = "Select the model",
|
128 |
choices = mdx23c_models,
|
129 |
value = lambda : None,
|
130 |
interactive = True
|
131 |
)
|
132 |
mdx23c_output_format = gr.Dropdown(
|
133 |
+
label = "Select the output format",
|
134 |
choices = output_format,
|
135 |
value = lambda : None,
|
136 |
interactive = True
|
137 |
)
|
138 |
+
with gr.Accordion("Advanced settings", open = False):
|
139 |
with gr.Group():
|
140 |
with gr.Row():
|
141 |
mdx23c_segment_size = gr.Slider(
|
142 |
minimum = 32,
|
143 |
maximum = 4000,
|
144 |
step = 32,
|
145 |
+
label = "Segment size",
|
146 |
+
info = "Larger consumes more resources, but may give better results",
|
147 |
value = 256,
|
148 |
interactive = True
|
149 |
)
|
150 |
mdx23c_override_segment_size = gr.Checkbox(
|
151 |
+
label = "Override segment size",
|
152 |
+
info = "Override model default segment size instead of using the model default value",
|
153 |
value = False,
|
154 |
interactive = True
|
155 |
)
|
|
|
158 |
minimum = 2,
|
159 |
maximum = 50,
|
160 |
step = 1,
|
161 |
+
label = "Overlap",
|
162 |
+
info = "Amount of overlap between prediction windows",
|
163 |
value = 8,
|
164 |
interactive = True
|
165 |
)
|
166 |
mdx23c_batch_size = gr.Slider(
|
167 |
+
label = "Batch size",
|
168 |
+
info = "Larger consumes more RAM but may process slightly faster",
|
169 |
minimum = 1,
|
170 |
maximum = 16,
|
171 |
step = 1,
|
|
|
174 |
)
|
175 |
with gr.Row():
|
176 |
mdx23c_normalization_threshold = gr.Slider(
|
177 |
+
label = "Normalization threshold",
|
178 |
+
info = "The threshold for audio normalization",
|
179 |
minimum = 0.1,
|
180 |
maximum = 1,
|
181 |
step = 0.1,
|
|
|
183 |
interactive = True
|
184 |
)
|
185 |
mdx23c_amplification_threshold = gr.Slider(
|
186 |
+
label = "Amplification threshold",
|
187 |
+
info = "The threshold for audio amplification",
|
188 |
minimum = 0.1,
|
189 |
maximum = 1,
|
190 |
step = 0.1,
|
|
|
193 |
)
|
194 |
with gr.Row():
|
195 |
mdx23c_audio = gr.Audio(
|
196 |
+
label = "Input audio",
|
197 |
type = "filepath",
|
198 |
interactive = True
|
199 |
)
|
200 |
+
with gr.Accordion("Separation by link", open = False):
|
201 |
with gr.Row():
|
202 |
mdx23c_link = gr.Textbox(
|
203 |
+
label = "Link",
|
204 |
+
placeholder = "Paste the link here",
|
205 |
interactive = True
|
206 |
)
|
207 |
with gr.Row():
|
208 |
+
gr.Markdown("You can paste the link to the video/audio from many sites, check the complete list [here](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)")
|
209 |
with gr.Row():
|
210 |
mdx23c_download_button = gr.Button(
|
211 |
+
"Download!",
|
212 |
variant = "primary"
|
213 |
)
|
214 |
|
|
|
216 |
|
217 |
|
218 |
with gr.Row():
|
219 |
+
mdx23c_button = gr.Button("Separate!", variant = "primary")
|
220 |
with gr.Row():
|
221 |
mdx23c_stem1 = gr.Audio(
|
222 |
show_download_button = True,
|
223 |
interactive = False,
|
224 |
+
label = "Stem 1",
|
225 |
type = "filepath"
|
226 |
)
|
227 |
mdx23c_stem2 = gr.Audio(
|
228 |
show_download_button = True,
|
229 |
interactive = False,
|
230 |
+
label = "Stem 2",
|
231 |
type = "filepath"
|
232 |
)
|
233 |
|
|
|
236 |
with gr.TabItem("MDX-NET"):
|
237 |
with gr.Row():
|
238 |
mdxnet_model = gr.Dropdown(
|
239 |
+
label = "Select the model",
|
240 |
choices = mdxnet_models,
|
241 |
value = lambda : None,
|
242 |
interactive = True
|
243 |
)
|
244 |
mdxnet_output_format = gr.Dropdown(
|
245 |
+
label = "Select the output format",
|
246 |
choices = output_format,
|
247 |
value = lambda : None,
|
248 |
interactive = True
|
249 |
)
|
250 |
+
with gr.Accordion("Advanced settings", open = False):
|
251 |
with gr.Group():
|
252 |
with gr.Row():
|
253 |
mdxnet_hop_length = gr.Slider(
|
254 |
+
label = "Hop length",
|
255 |
+
info = "Usually called stride in neural networks; only change if you know what you're doing",
|
256 |
minimum = 32,
|
257 |
maximum = 2048,
|
258 |
step = 32,
|
|
|
263 |
minimum = 32,
|
264 |
maximum = 4000,
|
265 |
step = 32,
|
266 |
+
label = "Segment size",
|
267 |
+
info = "Larger consumes more resources, but may give better results",
|
268 |
value = 256,
|
269 |
interactive = True
|
270 |
)
|
271 |
mdxnet_denoise = gr.Checkbox(
|
272 |
+
label = "Denoise",
|
273 |
+
info = "Enable denoising during separation",
|
274 |
value = True,
|
275 |
interactive = True
|
276 |
)
|
277 |
with gr.Row():
|
278 |
mdxnet_overlap = gr.Slider(
|
279 |
+
label = "Overlap",
|
280 |
+
info = "Amount of overlap between prediction windows",
|
281 |
minimum = 0.001,
|
282 |
maximum = 0.999,
|
283 |
step = 0.001,
|
|
|
285 |
interactive = True
|
286 |
)
|
287 |
mdxnet_batch_size = gr.Slider(
|
288 |
+
label = "Batch size",
|
289 |
+
info = "Larger consumes more RAM but may process slightly faster",
|
290 |
minimum = 1,
|
291 |
maximum = 16,
|
292 |
step = 1,
|
|
|
295 |
)
|
296 |
with gr.Row():
|
297 |
mdxnet_normalization_threshold = gr.Slider(
|
298 |
+
label = "Normalization threshold",
|
299 |
+
info = "The threshold for audio normalization",
|
300 |
minimum = 0.1,
|
301 |
maximum = 1,
|
302 |
step = 0.1,
|
|
|
304 |
interactive = True
|
305 |
)
|
306 |
mdxnet_amplification_threshold = gr.Slider(
|
307 |
+
label = "Amplification threshold",
|
308 |
+
info = "The threshold for audio amplification",
|
309 |
minimum = 0.1,
|
310 |
maximum = 1,
|
311 |
step = 0.1,
|
|
|
314 |
)
|
315 |
with gr.Row():
|
316 |
mdxnet_audio = gr.Audio(
|
317 |
+
label = "Input audio",
|
318 |
type = "filepath",
|
319 |
interactive = True
|
320 |
)
|
321 |
+
with gr.Accordion("Separation by link", open = False):
|
322 |
with gr.Row():
|
323 |
mdxnet_link = gr.Textbox(
|
324 |
+
label = "Link",
|
325 |
+
placeholder = "Paste the link here",
|
326 |
interactive = True
|
327 |
)
|
328 |
with gr.Row():
|
|
|
372 |
with gr.Group():
|
373 |
with gr.Row():
|
374 |
vrarch_window_size = gr.Slider(
|
375 |
+
label = "Window size",
|
376 |
+
info = "Balance quality and speed. 1024 = fast but lower, 320 = slower but better quality",
|
377 |
minimum=320,
|
378 |
maximum=1024,
|
379 |
step=32,
|
|
|
455 |
type = "filepath",
|
456 |
interactive = True
|
457 |
)
|
458 |
+
with gr.Accordion("Separation by link", open = False):
|
459 |
with gr.Row():
|
460 |
vrarch_link = gr.Textbox(
|
461 |
label = "Link",
|