Update app.py
Browse files
app.py
CHANGED
@@ -127,8 +127,7 @@ def infer(genre_txt_content, lyrics_txt_content, num_segments, max_new_tokens):
|
|
127 |
"--stage2_batch_size", "4",
|
128 |
"--output_dir", f"{output_dir}",
|
129 |
"--cuda_idx", "0",
|
130 |
-
"--max_new_tokens", str(max_new_tokens)
|
131 |
-
"--disable_offload_model"
|
132 |
]
|
133 |
|
134 |
# Set up environment variables for CUDA with optimized settings
|
@@ -222,13 +221,14 @@ with gr.Blocks() as demo:
|
|
222 |
|
223 |
with gr.Column():
|
224 |
|
225 |
-
num_segments = gr.Number(label="Number of Segments", value=2, interactive=
|
226 |
max_new_tokens = gr.Slider(label="Max New Tokens", minimum=500, maximum="3000", step=500, value=1500, interactive=True)
|
227 |
|
228 |
submit_btn = gr.Button("Submit")
|
229 |
music_out = gr.Audio(label="Audio Result")
|
230 |
-
|
231 |
-
|
|
|
232 |
|
233 |
gr.Examples(
|
234 |
examples = [
|
|
|
127 |
"--stage2_batch_size", "4",
|
128 |
"--output_dir", f"{output_dir}",
|
129 |
"--cuda_idx", "0",
|
130 |
+
"--max_new_tokens", str(max_new_tokens)
|
|
|
131 |
]
|
132 |
|
133 |
# Set up environment variables for CUDA with optimized settings
|
|
|
221 |
|
222 |
with gr.Column():
|
223 |
|
224 |
+
num_segments = gr.Number(label="Number of Segments", value=2, interactive=False)
|
225 |
max_new_tokens = gr.Slider(label="Max New Tokens", minimum=500, maximum="3000", step=500, value=1500, interactive=True)
|
226 |
|
227 |
submit_btn = gr.Button("Submit")
|
228 |
music_out = gr.Audio(label="Audio Result")
|
229 |
+
with gr.Accordion("Vocal & Instrumental", open=False):
|
230 |
+
instrumental = gr.Audio(label="Intrumental")
|
231 |
+
vocal = gr.Audio(label="Vocal")
|
232 |
|
233 |
gr.Examples(
|
234 |
examples = [
|