bringing "customization" tab back!
Browse files
app.py
CHANGED
@@ -1020,7 +1020,7 @@ def ui_full(launch_kwargs):
|
|
1020 |
trim_end_a = gr.Number(label="Trim End", value=0, interactive=True)
|
1021 |
audio_a = gr.Audio(source="upload", type="numpy", label="Input Audio (optional)", interactive=True)
|
1022 |
|
1023 |
-
|
1024 |
with gr.Row():
|
1025 |
with gr.Column():
|
1026 |
background_a = gr.ColorPicker(value="#0f0f0f", label="background color", interactive=True, scale=0)
|
@@ -1030,7 +1030,7 @@ def ui_full(launch_kwargs):
|
|
1030 |
image_a = gr.Image(label="Background Image", type="filepath", interactive=True, scale=4)
|
1031 |
with gr.Row():
|
1032 |
height_a = gr.Number(label="Height", value=512, interactive=True)
|
1033 |
-
width_a = gr.Number(label="Width", value=768, interactive=True)
|
1034 |
|
1035 |
with gr.Tab("Settings"):
|
1036 |
with gr.Row():
|
@@ -1508,16 +1508,10 @@ def ui_full(launch_kwargs):
|
|
1508 |
gen_type = gr.Text(value="music", interactive=False, visible=False)
|
1509 |
gen_type_a = gr.Text(value="audio", interactive=False, visible=False)
|
1510 |
|
1511 |
-
image = None
|
1512 |
-
background_a = None
|
1513 |
-
bar1_a = (132, 204, 22)
|
1514 |
-
bar2_a = (16, 185, 129)
|
1515 |
-
height_a = 512
|
1516 |
-
width_a = 768
|
1517 |
#send_gen_a.click(info_to_params_a, inputs=[in_audio], outputs=[decoder_a, struc_prompts_a, global_prompt_a, s_a, prompts_a[0], prompts_a[1], prompts_a[2], prompts_a[3], prompts_a[4], prompts_a[5], prompts_a[6], prompts_a[7], prompts_a[8], prompts_a[9], repeats_a[0], repeats_a[1], repeats_a[2], repeats_a[3], repeats_a[4], repeats_a[5], repeats_a[6], repeats_a[7], repeats_a[8], repeats_a[9], duration_a, topk_a, topp_a, temperature_a, cfg_coef_a, seed_a, overlap_a, channel_a, sr_select_a], queue=False)
|
1518 |
reuse_seed_a.click(fn=lambda x: x, inputs=[seed_used_a], outputs=[seed_a], queue=False)
|
1519 |
send_audio_a.click(fn=lambda x: x, inputs=[backup_only_a], outputs=[audio_a], queue=False)
|
1520 |
-
submit_a.click(predict_full, inputs=[gen_type_a, model_a, decoder_a, dropdown, basemodel, s_a, struc_prompts_a, bpm, key, scale, global_prompt_a, prompts_a[0], prompts_a[1], prompts_a[2], prompts_a[3], prompts_a[4], prompts_a[5], prompts_a[6], prompts_a[7], prompts_a[8], prompts_a[9], repeats_a[0], repeats_a[1], repeats_a[2], repeats_a[3], repeats_a[4], repeats_a[5], repeats_a[6], repeats_a[7], repeats_a[8], repeats_a[9], audio_a, mode_a, trim_start_a, trim_end_a, duration_a, topk_a, topp_a, temperature_a, cfg_coef_a, seed_a, overlap_a,
|
1521 |
input_type_a.change(toggle_audio_src, input_type_a, [audio_a], queue=False, show_progress=True)
|
1522 |
to_calc_a.click(calc_time, inputs=[gen_type_a, s_a, duration_a, overlap_a, repeats_a[0], repeats_a[1], repeats_a[2], repeats_a[3], repeats_a[4], repeats_a[5], repeats_a[6], repeats_a[7], repeats_a[8], repeats_a[9]], outputs=[calcs_a[0], calcs_a[1], calcs_a[2], calcs_a[3], calcs_a[4], calcs_a[5], calcs_a[6], calcs_a[7], calcs_a[8], calcs_a[9]], queue=False)
|
1523 |
|
|
|
1020 |
trim_end_a = gr.Number(label="Trim End", value=0, interactive=True)
|
1021 |
audio_a = gr.Audio(source="upload", type="numpy", label="Input Audio (optional)", interactive=True)
|
1022 |
|
1023 |
+
with gr.Tab("Customization"):
|
1024 |
with gr.Row():
|
1025 |
with gr.Column():
|
1026 |
background_a = gr.ColorPicker(value="#0f0f0f", label="background color", interactive=True, scale=0)
|
|
|
1030 |
image_a = gr.Image(label="Background Image", type="filepath", interactive=True, scale=4)
|
1031 |
with gr.Row():
|
1032 |
height_a = gr.Number(label="Height", value=512, interactive=True)
|
1033 |
+
width_a = gr.Number(label="Width", value=768, interactive=True)
|
1034 |
|
1035 |
with gr.Tab("Settings"):
|
1036 |
with gr.Row():
|
|
|
1508 |
gen_type = gr.Text(value="music", interactive=False, visible=False)
|
1509 |
gen_type_a = gr.Text(value="audio", interactive=False, visible=False)
|
1510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1511 |
#send_gen_a.click(info_to_params_a, inputs=[in_audio], outputs=[decoder_a, struc_prompts_a, global_prompt_a, s_a, prompts_a[0], prompts_a[1], prompts_a[2], prompts_a[3], prompts_a[4], prompts_a[5], prompts_a[6], prompts_a[7], prompts_a[8], prompts_a[9], repeats_a[0], repeats_a[1], repeats_a[2], repeats_a[3], repeats_a[4], repeats_a[5], repeats_a[6], repeats_a[7], repeats_a[8], repeats_a[9], duration_a, topk_a, topp_a, temperature_a, cfg_coef_a, seed_a, overlap_a, channel_a, sr_select_a], queue=False)
|
1512 |
reuse_seed_a.click(fn=lambda x: x, inputs=[seed_used_a], outputs=[seed_a], queue=False)
|
1513 |
send_audio_a.click(fn=lambda x: x, inputs=[backup_only_a], outputs=[audio_a], queue=False)
|
1514 |
+
submit_a.click(predict_full, inputs=[gen_type_a, model_a, decoder_a, dropdown, basemodel, s_a, struc_prompts_a, bpm, key, scale, global_prompt_a, prompts_a[0], prompts_a[1], prompts_a[2], prompts_a[3], prompts_a[4], prompts_a[5], prompts_a[6], prompts_a[7], prompts_a[8], prompts_a[9], repeats_a[0], repeats_a[1], repeats_a[2], repeats_a[3], repeats_a[4], repeats_a[5], repeats_a[6], repeats_a[7], repeats_a[8], repeats_a[9], audio_a, mode_a, trim_start_a, trim_end_a, duration_a, topk_a, topp_a, temperature_a, cfg_coef_a, seed_a, overlap_a, image_a, height_a, width_a, background_a, bar1_a, bar2_a, channel_a, sr_select_a], outputs=[output_a, audio_only_a, backup_only_a, download_a, seed_used_a])
|
1515 |
input_type_a.change(toggle_audio_src, input_type_a, [audio_a], queue=False, show_progress=True)
|
1516 |
to_calc_a.click(calc_time, inputs=[gen_type_a, s_a, duration_a, overlap_a, repeats_a[0], repeats_a[1], repeats_a[2], repeats_a[3], repeats_a[4], repeats_a[5], repeats_a[6], repeats_a[7], repeats_a[8], repeats_a[9]], outputs=[calcs_a[0], calcs_a[1], calcs_a[2], calcs_a[3], calcs_a[4], calcs_a[5], calcs_a[6], calcs_a[7], calcs_a[8], calcs_a[9]], queue=False)
|
1517 |
|