Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
f295d62
1
Parent(s):
77e4f9e
updated musicgen api handler
Browse files
app.py
CHANGED
@@ -397,7 +397,7 @@ def extend_with_musicgen_api(audio_path, prompt_duration, musicgen_model, output
|
|
397 |
# Call the continue_music API
|
398 |
result = client.predict(
|
399 |
input_audio_path=handle_file(audio_path),
|
400 |
-
prompt_duration=prompt_duration, #
|
401 |
musicgen_model=musicgen_model,
|
402 |
output_duration=float(output_duration), # Ensure it's a float
|
403 |
api_name="/continue_music"
|
@@ -644,8 +644,8 @@ with gr.Blocks(title="stable-melodyflow") as iface:
|
|
644 |
with gr.Column():
|
645 |
musicgen_prompt_duration = gr.Dropdown(
|
646 |
label="prompt duration (seconds)",
|
647 |
-
choices=[
|
648 |
-
value=
|
649 |
info="how much of the end to use as prompt for continuation"
|
650 |
)
|
651 |
musicgen_output_duration = gr.Slider(
|
|
|
397 |
# Call the continue_music API
|
398 |
result = client.predict(
|
399 |
input_audio_path=handle_file(audio_path),
|
400 |
+
prompt_duration=prompt_duration, # Integer from dropdown
|
401 |
musicgen_model=musicgen_model,
|
402 |
output_duration=float(output_duration), # Ensure it's a float
|
403 |
api_name="/continue_music"
|
|
|
644 |
with gr.Column():
|
645 |
musicgen_prompt_duration = gr.Dropdown(
|
646 |
label="prompt duration (seconds)",
|
647 |
+
choices=[3, 5, 7, 10], # Back to integers since the function expects numbers
|
648 |
+
value=5,
|
649 |
info="how much of the end to use as prompt for continuation"
|
650 |
)
|
651 |
musicgen_output_duration = gr.Slider(
|