Spaces:
Paused
Paused
koby commited on
Commit ·
d949cfd
1
Parent(s): b5b190c
wire flac_file as real download output
Browse files
app.py
CHANGED
|
@@ -187,7 +187,7 @@ def generate(style, lyrics, cot, seed, cfg_scale, duration):
|
|
| 187 |
"created_at": datetime.now(timezone.utc).isoformat(),
|
| 188 |
}, song_id)
|
| 189 |
|
| 190 |
-
return flac_path, mp3_path, f"seed={seed} | {actual:.0f}s (asked {duration}s) | {os.path.getsize(mp3_path) // 1024}KB MP3 320kbps"
|
| 191 |
|
| 192 |
|
| 193 |
with gr.Blocks(title="YuE2-3B Music") as demo:
|
|
@@ -209,7 +209,7 @@ with gr.Blocks(title="YuE2-3B Music") as demo:
|
|
| 209 |
flac_file = gr.File(label="Download FLAC")
|
| 210 |
mp3_file = gr.File(label="Download MP3 320kbps")
|
| 211 |
info = gr.Textbox(label="Info")
|
| 212 |
-
btn.click(fn=generate, inputs=[style, lyrics, cot, seed, cfg, duration], outputs=[audio, mp3_file, info], queue=True)
|
| 213 |
duration.change(fn=_dur_label, inputs=duration, outputs=duration_txt)
|
| 214 |
gr.Markdown(
|
| 215 |
"---\n🎶 **Community songs:** every generation is auto-shared to the "
|
|
|
|
| 187 |
"created_at": datetime.now(timezone.utc).isoformat(),
|
| 188 |
}, song_id)
|
| 189 |
|
| 190 |
+
return flac_path, flac_path, mp3_path, f"seed={seed} | {actual:.0f}s (asked {duration}s) | {os.path.getsize(mp3_path) // 1024}KB MP3 320kbps"
|
| 191 |
|
| 192 |
|
| 193 |
with gr.Blocks(title="YuE2-3B Music") as demo:
|
|
|
|
| 209 |
flac_file = gr.File(label="Download FLAC")
|
| 210 |
mp3_file = gr.File(label="Download MP3 320kbps")
|
| 211 |
info = gr.Textbox(label="Info")
|
| 212 |
+
btn.click(fn=generate, inputs=[style, lyrics, cot, seed, cfg, duration], outputs=[audio, flac_file, mp3_file, info], queue=True)
|
| 213 |
duration.change(fn=_dur_label, inputs=duration, outputs=duration_txt)
|
| 214 |
gr.Markdown(
|
| 215 |
"---\n🎶 **Community songs:** every generation is auto-shared to the "
|