Spaces:
Running
on
L40S
Running
on
L40S
hainazhu
commited on
Commit
·
b3a289b
1
Parent(s):
7cb5455
fix dimension bug
Browse files
app.py
CHANGED
|
@@ -66,7 +66,7 @@ def generate_song(description, lyric, prompt_audio=None):
|
|
| 66 |
|
| 67 |
sample_rate = model.cfg.sample_rate
|
| 68 |
|
| 69 |
-
audio_data = model(lyric, description, op.join(APP_DIR, 'sample/19_2-又是一天过去,烦恼如影随形10s.wav')).cpu().float().numpy()
|
| 70 |
|
| 71 |
# 创建输入配置的JSON
|
| 72 |
input_config = {
|
|
@@ -78,7 +78,6 @@ def generate_song(description, lyric, prompt_audio=None):
|
|
| 78 |
|
| 79 |
return (sample_rate, audio_data), json.dumps(input_config, indent=2)
|
| 80 |
|
| 81 |
-
|
| 82 |
# 创建Gradio界面
|
| 83 |
with gr.Blocks(title="LeVo Demo Space") as demo:
|
| 84 |
gr.Markdown("# 🎵 LeVo Demo Space")
|
|
|
|
| 66 |
|
| 67 |
sample_rate = model.cfg.sample_rate
|
| 68 |
|
| 69 |
+
audio_data = model(lyric, description, op.join(APP_DIR, 'sample/19_2-又是一天过去,烦恼如影随形10s.wav')).cpu().permute(1, 0).float().numpy()
|
| 70 |
|
| 71 |
# 创建输入配置的JSON
|
| 72 |
input_config = {
|
|
|
|
| 78 |
|
| 79 |
return (sample_rate, audio_data), json.dumps(input_config, indent=2)
|
| 80 |
|
|
|
|
| 81 |
# 创建Gradio界面
|
| 82 |
with gr.Blocks(title="LeVo Demo Space") as demo:
|
| 83 |
gr.Markdown("# 🎵 LeVo Demo Space")
|