Spaces:
Running
on
Zero
Running
on
Zero
Navonil Majumder
commited on
Commit
·
d2cd103
1
Parent(s):
6394bbc
Fixed the original code
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ gr.set_static_paths(paths=[Path.cwd().absolute()])
|
|
17 |
@spaces.GPU(duration=100)
|
18 |
def generate_song(reference_audio, lyrics_file, style_prompt, duration):
|
19 |
# We need to save the uploaded files to temporary paths to pass to the model
|
20 |
-
reference_audio = reference_audio
|
21 |
|
22 |
|
23 |
# The model expects paths, so we write the prompt to a temp file if needed
|
@@ -64,7 +64,7 @@ with gr.Blocks() as demo:
|
|
64 |
gr.Markdown("### Example Usage")
|
65 |
gr.Examples(
|
66 |
examples=[
|
67 |
-
[
|
68 |
],
|
69 |
inputs=[reference_audio, lyrics_file, style_prompt, duration_slider],
|
70 |
outputs=output_audio,
|
|
|
17 |
@spaces.GPU(duration=100)
|
18 |
def generate_song(reference_audio, lyrics_file, style_prompt, duration):
|
19 |
# We need to save the uploaded files to temporary paths to pass to the model
|
20 |
+
reference_audio = reference_audio not in ("", None) and reference_audio or None
|
21 |
|
22 |
|
23 |
# The model expects paths, so we write the prompt to a temp file if needed
|
|
|
64 |
gr.Markdown("### Example Usage")
|
65 |
gr.Examples(
|
66 |
examples=[
|
67 |
+
["", "gt0.json", "A sad, slow, acoustic country song", 260],
|
68 |
],
|
69 |
inputs=[reference_audio, lyrics_file, style_prompt, duration_slider],
|
70 |
outputs=output_audio,
|