trying to simplify the interface (adding more settings to "Structured Prompt"
Browse files
app.py
CHANGED
@@ -970,24 +970,26 @@ def ui_full(launch_kwargs):
|
|
970 |
with gr.Row():
|
971 |
#with gr.Column():
|
972 |
with gr.Tab("Generation"):
|
973 |
-
with gr.Accordion("Structure Prompts", open=False):
|
974 |
-
with gr.Row():
|
975 |
-
struc_prompts_a = gr.Checkbox(label="Enable", value=False, interactive=True, container=False)
|
976 |
-
global_prompt_a = gr.Text(label="Global Prompt", interactive=True, scale=3)
|
977 |
-
with gr.Row():
|
978 |
-
s_a = gr.Slider(1, max_textboxes, value=1, step=1, label="Prompts:", interactive=True, scale=2)
|
979 |
with gr.Column():
|
980 |
textboxes_a = []
|
981 |
prompts_a = []
|
982 |
repeats_a = []
|
983 |
calcs_a = []
|
984 |
with gr.Row():
|
985 |
-
text0_a = gr.Text(label="
|
986 |
prompts_a.append(text0_a)
|
987 |
drag0_a = gr.Number(label="Repeat", value=1, interactive=True, scale=1)
|
988 |
repeats_a.append(drag0_a)
|
989 |
calc0_a = gr.Text(interactive=False, value="00:00 - 00:00", scale=1, label="Time")
|
990 |
calcs_a.append(calc0_a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
991 |
for i in range(max_textboxes):
|
992 |
with gr.Row(visible=False) as t_a:
|
993 |
text_a = gr.Text(label="Input Text", interactive=True, scale=3)
|
@@ -997,11 +999,12 @@ def ui_full(launch_kwargs):
|
|
997 |
prompts_a.append(text_a)
|
998 |
repeats_a.append(repeat_a)
|
999 |
calcs_a.append(calc_a)
|
|
|
|
|
1000 |
to_calc_a = gr.Button("Calculate Timings", variant="secondary")
|
|
|
1001 |
with gr.Row():
|
1002 |
duration_a = gr.Slider(minimum=1, maximum=300, value=10, step=1, label="Duration", interactive=True)
|
1003 |
-
with gr.Row():
|
1004 |
-
overlap_a = gr.Slider(minimum=1, maximum=9, value=2, step=1, label="Overlap", interactive=True)
|
1005 |
with gr.Row():
|
1006 |
seed_a = gr.Number(label="Seed", value=-1, scale=4, precision=0, interactive=True)
|
1007 |
gr.Button('\U0001f3b2\ufe0f', scale=1).click(fn=lambda: -1, outputs=[seed_a], queue=False)
|
|
|
970 |
with gr.Row():
|
971 |
#with gr.Column():
|
972 |
with gr.Tab("Generation"):
|
|
|
|
|
|
|
|
|
|
|
|
|
973 |
with gr.Column():
|
974 |
textboxes_a = []
|
975 |
prompts_a = []
|
976 |
repeats_a = []
|
977 |
calcs_a = []
|
978 |
with gr.Row():
|
979 |
+
text0_a = gr.Text(label="Global Prompt", interactive=True, scale=4)
|
980 |
prompts_a.append(text0_a)
|
981 |
drag0_a = gr.Number(label="Repeat", value=1, interactive=True, scale=1)
|
982 |
repeats_a.append(drag0_a)
|
983 |
calc0_a = gr.Text(interactive=False, value="00:00 - 00:00", scale=1, label="Time")
|
984 |
calcs_a.append(calc0_a)
|
985 |
+
|
986 |
+
with gr.Accordion("Structured Prompt", open=False):
|
987 |
+
with gr.Row():
|
988 |
+
struc_prompts_a = gr.Checkbox(label="Enable", value=False, interactive=True, container=False)
|
989 |
+
#global_prompt_a = gr.Text(label="Global Prompt", interactive=True, scale=3)
|
990 |
+
global_prompt_a = text0_a
|
991 |
+
with gr.Row():
|
992 |
+
s_a = gr.Slider(1, max_textboxes, value=1, step=1, label="Prompts:", interactive=True, scale=2)
|
993 |
for i in range(max_textboxes):
|
994 |
with gr.Row(visible=False) as t_a:
|
995 |
text_a = gr.Text(label="Input Text", interactive=True, scale=3)
|
|
|
999 |
prompts_a.append(text_a)
|
1000 |
repeats_a.append(repeat_a)
|
1001 |
calcs_a.append(calc_a)
|
1002 |
+
|
1003 |
+
overlap_a = gr.Slider(minimum=1, maximum=9, value=2, step=1, label="Overlap", interactive=True)
|
1004 |
to_calc_a = gr.Button("Calculate Timings", variant="secondary")
|
1005 |
+
|
1006 |
with gr.Row():
|
1007 |
duration_a = gr.Slider(minimum=1, maximum=300, value=10, step=1, label="Duration", interactive=True)
|
|
|
|
|
1008 |
with gr.Row():
|
1009 |
seed_a = gr.Number(label="Seed", value=-1, scale=4, precision=0, interactive=True)
|
1010 |
gr.Button('\U0001f3b2\ufe0f', scale=1).click(fn=lambda: -1, outputs=[seed_a], queue=False)
|