Update app.py
Browse files
app.py
CHANGED
|
@@ -237,6 +237,50 @@ def mvsep_download_separated_audio(hash_textbox):
|
|
| 237 |
return json.dumps(urls, indent=4)
|
| 238 |
except requests.exceptions.JSONDecodeError:
|
| 239 |
return gr.Info("Nothing to download yet. Check back later.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
|
| 241 |
|
| 242 |
with gr.Blocks(theme='sudeepshouche/minimalist', title="Global Dataset Maker") as app:
|
|
@@ -293,7 +337,7 @@ with gr.Blocks(theme='sudeepshouche/minimalist', title="Global Dataset Maker") a
|
|
| 293 |
mindur2 = gr.Number(label="Min duration", minimum=1, maximum=10, value=1)
|
| 294 |
maxdur2 = gr.Number(label="Max duration", minimum=1, maximum=10, value=5)
|
| 295 |
name_for_split_files2 = gr.Textbox(label="Name for split files")
|
| 296 |
-
strict = gr.Checkbox(
|
| 297 |
audiofileuploadbtn = gr.Button("Split", variant='primary')
|
| 298 |
audiofileuploadbtn.click(
|
| 299 |
split_wav_or_mp3_file,
|
|
@@ -341,13 +385,19 @@ with gr.Blocks(theme='sudeepshouche/minimalist', title="Global Dataset Maker") a
|
|
| 341 |
with gr.Row():
|
| 342 |
mvsep_key = gr.Textbox(placeholder="Enter your MVSEP API key.", label="API key")
|
| 343 |
audio_file = gr.File(file_count='single', file_types=[".mp3"], label="Audio file")
|
| 344 |
-
sep_int = gr.Number(11, label="Separation type (default is 11).", minimum=0, maximum=
|
| 345 |
send_req = gr.Button("Send request", variant='primary')
|
|
|
|
| 346 |
send_req.click(
|
| 347 |
mvsep_api_request,
|
| 348 |
[mvsep_key, audio_file, sep_int],
|
| 349 |
[gr.Text(label="Output")]
|
| 350 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
with gr.Tab("Get status of request"):
|
| 352 |
with gr.Row():
|
| 353 |
with gr.Column():
|
|
@@ -367,6 +417,7 @@ with gr.Blocks(theme='sudeepshouche/minimalist', title="Global Dataset Maker") a
|
|
| 367 |
)
|
| 368 |
|
| 369 |
with gr.TabItem("Changelog"):
|
|
|
|
| 370 |
gr.Markdown("v0.99.3 - Added MVSEP in Misc Tools. This is VERY EXPERIMENTAL and there will be bugs present.")
|
| 371 |
gr.Markdown("v0.99.2 - Added an mp4 file converter.")
|
| 372 |
gr.Markdown("v0.99.1 - Removed very old tools (including the 'Upcoming Features' tab) that did not fit with the nature of the program.")
|
|
|
|
| 237 |
return json.dumps(urls, indent=4)
|
| 238 |
except requests.exceptions.JSONDecodeError:
|
| 239 |
return gr.Info("Nothing to download yet. Check back later.")
|
| 240 |
+
|
| 241 |
+
def mvsep_list_available_models():
|
| 242 |
+
return [
|
| 243 |
+
"0 - spleeter (vocals, music)",
|
| 244 |
+
"1 - spleeter (vocals, drums, bass, other)",
|
| 245 |
+
"2 - spleeter (vocals, drums, bass, piano, other)",
|
| 246 |
+
"3 - unmix XL (vocals, drums, bass, other)",
|
| 247 |
+
"4 - unmix HQ (vocals, drums, bass, other)",
|
| 248 |
+
"5 - unmix SD (vocals, drums, bass, other)",
|
| 249 |
+
"6 - unmix SE (vocals, music)",
|
| 250 |
+
"7 - MDX A (vocals, drums, bass, other)",
|
| 251 |
+
"8 - MDX B (vocals, drums, bass, other)",
|
| 252 |
+
"9 - UVR HQ (vocals, music)",
|
| 253 |
+
"10 - Demucs3 Model A (vocals, drums, bass, other)",
|
| 254 |
+
"11 - Demucs3 Model B (vocals, drums, bass, other)",
|
| 255 |
+
"12 - MDX-B Karaoke (lead/back vocals)",
|
| 256 |
+
"13 - Demucs2 (vocals, drums, bass, other)",
|
| 257 |
+
"14 - Zero Shot (Query Based) (LQ)",
|
| 258 |
+
"15 - Danna sep (vocals, drums, bass, other)",
|
| 259 |
+
"16 - Byte Dance (vocals, drums, bass, other)",
|
| 260 |
+
"17 - UVRv5 Demucs (vocals, music)",
|
| 261 |
+
"18 - MVSep DNR (music, sfx, speech)",
|
| 262 |
+
"19 - MVSep Vocal Model (vocals, music)",
|
| 263 |
+
"20 - Demucs4 HT (vocals, drums, bass, other)",
|
| 264 |
+
"22 - FoxJoy Reverb Removal (other)",
|
| 265 |
+
"23 - MDX B (vocals, instrumental)",
|
| 266 |
+
"24 - MVSep Demucs4HT DNR (dialog, sfx, music)",
|
| 267 |
+
"25 - MDX23C (vocals, instrumental)",
|
| 268 |
+
"26 - Ensemble (vocals, instrumental) [PREMIUM ONLY]",
|
| 269 |
+
"27 - Demucs4 Vocals 2023 (vocals, instrumental)",
|
| 270 |
+
"28 - Ensemble (vocals, instrumental, bass, drums, other) [PREMIUM ONLY]",
|
| 271 |
+
"29 - MVSep Piano (piano, other)",
|
| 272 |
+
"30 - Ensemble All-In (vocals, bass, drums, piano, guitar, lead/back vocals, other) [PREMIUM ONLY]",
|
| 273 |
+
"31 - MVSep Guitar (guitar, other)",
|
| 274 |
+
"33 - Vit Large 23 (vocals, instrum)",
|
| 275 |
+
"34 - MVSep Crowd removal (crowd, other)",
|
| 276 |
+
"35 - MVSep MelBand Roformer (vocals, instrum)",
|
| 277 |
+
"36 - BandIt Plus (speech, music, effects)",
|
| 278 |
+
"37 - DrumSep (kick, snare, cymbals, toms)",
|
| 279 |
+
"38 - LarsNet (kick, snare, cymbals, toms, hihat)",
|
| 280 |
+
"39 - Whisper (extract text from audio)",
|
| 281 |
+
"40 - BS Roformer (vocals, instrumental)",
|
| 282 |
+
"41 - MVSep Bass (bass, other)"
|
| 283 |
+
]
|
| 284 |
|
| 285 |
|
| 286 |
with gr.Blocks(theme='sudeepshouche/minimalist', title="Global Dataset Maker") as app:
|
|
|
|
| 337 |
mindur2 = gr.Number(label="Min duration", minimum=1, maximum=10, value=1)
|
| 338 |
maxdur2 = gr.Number(label="Max duration", minimum=1, maximum=10, value=5)
|
| 339 |
name_for_split_files2 = gr.Textbox(label="Name for split files")
|
| 340 |
+
strict = gr.Checkbox(True, label="Enable strict duration?", info="Use this option if you want to minimize the '(audio_file) is less than 0.76 seconds' warning on Colab. Keep in mind that this only applies for min duration, max is ignored.")
|
| 341 |
audiofileuploadbtn = gr.Button("Split", variant='primary')
|
| 342 |
audiofileuploadbtn.click(
|
| 343 |
split_wav_or_mp3_file,
|
|
|
|
| 385 |
with gr.Row():
|
| 386 |
mvsep_key = gr.Textbox(placeholder="Enter your MVSEP API key.", label="API key")
|
| 387 |
audio_file = gr.File(file_count='single', file_types=[".mp3"], label="Audio file")
|
| 388 |
+
sep_int = gr.Number(11, label="Separation type (default is 11).", minimum=0, maximum=41, interactive=True)
|
| 389 |
send_req = gr.Button("Send request", variant='primary')
|
| 390 |
+
get_available_models = gr.Button("Get available models", variant='secondary')
|
| 391 |
send_req.click(
|
| 392 |
mvsep_api_request,
|
| 393 |
[mvsep_key, audio_file, sep_int],
|
| 394 |
[gr.Text(label="Output")]
|
| 395 |
)
|
| 396 |
+
get_available_models.click(
|
| 397 |
+
mvsep_list_available_models,
|
| 398 |
+
None,
|
| 399 |
+
[gr.Text(label="Models")]
|
| 400 |
+
)
|
| 401 |
with gr.Tab("Get status of request"):
|
| 402 |
with gr.Row():
|
| 403 |
with gr.Column():
|
|
|
|
| 417 |
)
|
| 418 |
|
| 419 |
with gr.TabItem("Changelog"):
|
| 420 |
+
gr.Markdown("v0.99.4 - Added a button to display the available models for MVSEP.")
|
| 421 |
gr.Markdown("v0.99.3 - Added MVSEP in Misc Tools. This is VERY EXPERIMENTAL and there will be bugs present.")
|
| 422 |
gr.Markdown("v0.99.2 - Added an mp4 file converter.")
|
| 423 |
gr.Markdown("v0.99.1 - Removed very old tools (including the 'Upcoming Features' tab) that did not fit with the nature of the program.")
|