Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -339,7 +339,7 @@ def download_audio(url, cookie_file=None):
|
|
| 339 |
download_url = f'https://drive.google.com/uc?id={file_id}'
|
| 340 |
temp_output_path = 'ytdl/gdrive_temp_audio'
|
| 341 |
gdown.download(download_url, temp_output_path, quiet=False)
|
| 342 |
-
if not os.
|
| 343 |
return None, "Downloaded file not found", None
|
| 344 |
output_path = 'ytdl/gdrive_audio.wav'
|
| 345 |
try:
|
|
@@ -664,7 +664,7 @@ def create_interface():
|
|
| 664 |
with gr.Blocks(title="๐ต SESA Fast Separation ๐ต", css=CSS, elem_id="app-container") as app:
|
| 665 |
gr.Markdown("<h1 class='header-text'>๐ต SESA Fast Separation ๐ต</h1>")
|
| 666 |
gr.Markdown("**Note**: If YouTube downloads fail, upload a valid cookies file or a local WAV file. [Cookie Instructions](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies)")
|
| 667 |
-
gr.Markdown("**Tip**: For
|
| 668 |
with gr.Tabs():
|
| 669 |
with gr.Tab("โ๏ธ Settings"):
|
| 670 |
with gr.Group(elem_classes="dubbing-theme"):
|
|
@@ -721,7 +721,7 @@ def create_interface():
|
|
| 721 |
ensemble_weights = gr.Textbox(label="โ๏ธ Weights", placeholder="e.g., 1.0, 1.0, 1.0 (comma-separated)", interactive=True)
|
| 722 |
ensemble_button = gr.Button("๐๏ธ Run Ensemble!", variant="primary")
|
| 723 |
ensemble_output = gr.Audio(label="๐ถ Ensemble Result", type="filepath", interactive=False)
|
| 724 |
-
ensemble_status = gr.HTML(label="๐ข Status"
|
| 725 |
ensemble_files = gr.File(label="๐ฅ Download Ensemble and Stems", interactive=False)
|
| 726 |
gr.HTML("<div class='footer'>Powered by Audio-Separator ๐๐ถ | Made with โค๏ธ</div>")
|
| 727 |
roformer_category.change(update_roformer_models, inputs=[roformer_category], outputs=[roformer_model])
|
|
@@ -734,7 +734,7 @@ def create_interface():
|
|
| 734 |
fn=roformer_separator,
|
| 735 |
inputs=[
|
| 736 |
roformer_audio, roformer_model, roformer_seg_size, roformer_override_seg_size,
|
| 737 |
-
roformer_overlap, roformer_pitch_shift,
|
| 738 |
output_format, norm_threshold, amp_threshold, batch_size, roformer_exclude_stems
|
| 739 |
],
|
| 740 |
outputs=[roformer_stem1, roformer_stem2, roformer_files]
|
|
|
|
| 339 |
download_url = f'https://drive.google.com/uc?id={file_id}'
|
| 340 |
temp_output_path = 'ytdl/gdrive_temp_audio'
|
| 341 |
gdown.download(download_url, temp_output_path, quiet=False)
|
| 342 |
+
if not os.path.exists(temp_output_path):
|
| 343 |
return None, "Downloaded file not found", None
|
| 344 |
output_path = 'ytdl/gdrive_audio.wav'
|
| 345 |
try:
|
|
|
|
| 664 |
with gr.Blocks(title="๐ต SESA Fast Separation ๐ต", css=CSS, elem_id="app-container") as app:
|
| 665 |
gr.Markdown("<h1 class='header-text'>๐ต SESA Fast Separation ๐ต</h1>")
|
| 666 |
gr.Markdown("**Note**: If YouTube downloads fail, upload a valid cookies file or a local WAV file. [Cookie Instructions](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies)")
|
| 667 |
+
gr.Markdown("**Tip**: For best results, use audio shorter than 15 minutes or fewer models (up to 6) to ensure smooth processing.")
|
| 668 |
with gr.Tabs():
|
| 669 |
with gr.Tab("โ๏ธ Settings"):
|
| 670 |
with gr.Group(elem_classes="dubbing-theme"):
|
|
|
|
| 721 |
ensemble_weights = gr.Textbox(label="โ๏ธ Weights", placeholder="e.g., 1.0, 1.0, 1.0 (comma-separated)", interactive=True)
|
| 722 |
ensemble_button = gr.Button("๐๏ธ Run Ensemble!", variant="primary")
|
| 723 |
ensemble_output = gr.Audio(label="๐ถ Ensemble Result", type="filepath", interactive=False)
|
| 724 |
+
ensemble_status = gr.HTML(label="๐ข Status")
|
| 725 |
ensemble_files = gr.File(label="๐ฅ Download Ensemble and Stems", interactive=False)
|
| 726 |
gr.HTML("<div class='footer'>Powered by Audio-Separator ๐๐ถ | Made with โค๏ธ</div>")
|
| 727 |
roformer_category.change(update_roformer_models, inputs=[roformer_category], outputs=[roformer_model])
|
|
|
|
| 734 |
fn=roformer_separator,
|
| 735 |
inputs=[
|
| 736 |
roformer_audio, roformer_model, roformer_seg_size, roformer_override_seg_size,
|
| 737 |
+
roformer_overlap, roformer_pitch_shift, model_dir, output_dir,
|
| 738 |
output_format, norm_threshold, amp_threshold, batch_size, roformer_exclude_stems
|
| 739 |
],
|
| 740 |
outputs=[roformer_stem1, roformer_stem2, roformer_files]
|