theNeofr commited on
Commit
2ac2781
·
verified ·
1 Parent(s): 2e667cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +51 -51
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"), open = False):
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 = _("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,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 = _("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,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 = _("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,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 = _("Normalization threshold"),
178
- info = _("The threshold for audio normalization"),
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 = _("Amplification threshold"),
187
- info = _("The threshold for audio amplification"),
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 = _("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,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(_("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,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 = _("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,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 = _("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,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 = _("Batch size"),
289
- info = _("Larger consumes more RAM but may process slightly faster"),
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 = _("Normalization threshold"),
299
- info = _("The threshold for audio normalization"),
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 = _("Amplification threshold"),
308
- info = _("The threshold for audio amplification"),
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 = _("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,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 = _("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,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"), open = False):
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",