Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,19 +1,18 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from musicgen import generate_music
|
| 3 |
from tts_singing import generate_singing
|
| 4 |
-
from merge_audio import
|
| 5 |
|
| 6 |
-
def
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
final_song =
|
| 10 |
return final_song
|
| 11 |
|
| 12 |
-
|
| 13 |
-
fn=
|
| 14 |
-
inputs=gr.Textbox(label="Enter your song prompt (e.g.
|
| 15 |
outputs=gr.Audio(label="Generated Song"),
|
| 16 |
-
title="
|
| 17 |
-
)
|
| 18 |
-
|
| 19 |
-
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from musicgen import generate_music
|
| 3 |
from tts_singing import generate_singing
|
| 4 |
+
from merge_audio import merge_audio_tracks
|
| 5 |
|
| 6 |
+
def text_to_song(prompt):
|
| 7 |
+
instrumental = generate_music(prompt)
|
| 8 |
+
vocals = generate_singing(prompt)
|
| 9 |
+
final_song = merge_audio_tracks(vocals, instrumental)
|
| 10 |
return final_song
|
| 11 |
|
| 12 |
+
gr.Interface(
|
| 13 |
+
fn=text_to_song,
|
| 14 |
+
inputs=gr.Textbox(label="Enter your song prompt (e.g. 'A happy birthday song')"),
|
| 15 |
outputs=gr.Audio(label="Generated Song"),
|
| 16 |
+
title="🎶 Text-to-Song Generator",
|
| 17 |
+
description="Enter any song idea and get music + vocals (CPU only)",
|
| 18 |
+
).launch()
|
|
|