moving Wiki tab on level up in AudioGen
Browse files
app.py
CHANGED
@@ -960,98 +960,99 @@ def ui_full(launch_kwargs):
|
|
960 |
"""
|
961 |
)
|
962 |
with gr.Tab("AudioGen"):
|
963 |
-
gr.
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
with gr.
|
970 |
-
with gr.
|
971 |
-
with gr.
|
972 |
-
with gr.
|
973 |
-
struc_prompts_a = gr.Checkbox(label="Enable", value=False, interactive=True, container=False)
|
974 |
-
global_prompt_a = gr.Text(label="Global Prompt", interactive=True, scale=3)
|
975 |
-
with gr.Row():
|
976 |
-
s_a = gr.Slider(1, max_textboxes, value=1, step=1, label="Prompts:", interactive=True, scale=2)
|
977 |
-
with gr.Column():
|
978 |
-
textboxes_a = []
|
979 |
-
prompts_a = []
|
980 |
-
repeats_a = []
|
981 |
-
calcs_a = []
|
982 |
-
with gr.Row():
|
983 |
-
text0_a = gr.Text(label="Input Text", interactive=True, scale=4)
|
984 |
-
prompts_a.append(text0_a)
|
985 |
-
drag0_a = gr.Number(label="Repeat", value=1, interactive=True, scale=1)
|
986 |
-
repeats_a.append(drag0_a)
|
987 |
-
calc0_a = gr.Text(interactive=False, value="00:00 - 00:00", scale=1, label="Time")
|
988 |
-
calcs_a.append(calc0_a)
|
989 |
-
for i in range(max_textboxes):
|
990 |
-
with gr.Row(visible=False) as t_a:
|
991 |
-
text_a = gr.Text(label="Input Text", interactive=True, scale=3)
|
992 |
-
repeat_a = gr.Number(label="Repeat", minimum=1, value=1, interactive=True, scale=1)
|
993 |
-
calc_a = gr.Text(interactive=False, value="00:00 - 00:00", scale=1, label="Time")
|
994 |
-
textboxes_a.append(t_a)
|
995 |
-
prompts_a.append(text_a)
|
996 |
-
repeats_a.append(repeat_a)
|
997 |
-
calcs_a.append(calc_a)
|
998 |
-
to_calc_a = gr.Button("Calculate Timings", variant="secondary")
|
999 |
-
with gr.Row():
|
1000 |
-
duration_a = gr.Slider(minimum=1, maximum=300, value=10, step=1, label="Duration", interactive=True)
|
1001 |
-
with gr.Row():
|
1002 |
-
overlap_a = gr.Slider(minimum=1, maximum=9, value=2, step=1, label="Overlap", interactive=True)
|
1003 |
-
with gr.Row():
|
1004 |
-
seed_a = gr.Number(label="Seed", value=-1, scale=4, precision=0, interactive=True)
|
1005 |
-
gr.Button('\U0001f3b2\ufe0f', scale=1).click(fn=lambda: -1, outputs=[seed_a], queue=False)
|
1006 |
-
reuse_seed_a = gr.Button('\u267b\ufe0f', scale=1)
|
1007 |
-
|
1008 |
-
with gr.Tab("Audio"):
|
1009 |
-
with gr.Row():
|
1010 |
-
with gr.Column():
|
1011 |
-
input_type_a = gr.Radio(["file", "mic"], value="file", label="Input Type (optional)", interactive=True)
|
1012 |
-
mode_a = gr.Radio(["sample"], label="Input Audio Mode (optional)", value="sample", interactive=False, visible=False)
|
1013 |
with gr.Row():
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
with gr.Tab("Customization"):
|
1019 |
-
with gr.Row():
|
1020 |
-
with gr.Column():
|
1021 |
-
background_a = gr.ColorPicker(value="#0f0f0f", label="background color", interactive=True, scale=0)
|
1022 |
-
bar1_a = gr.ColorPicker(value="#84cc16", label="bar color start", interactive=True, scale=0)
|
1023 |
-
bar2_a = gr.ColorPicker(value="#10b981", label="bar color end", interactive=True, scale=0)
|
1024 |
with gr.Column():
|
1025 |
-
|
|
|
|
|
|
|
1026 |
with gr.Row():
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1048 |
with gr.Row():
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1055 |
gr.Markdown(
|
1056 |
"""
|
1057 |
- **[Generate (button)]:**
|
|
|
960 |
"""
|
961 |
)
|
962 |
with gr.Tab("AudioGen"):
|
963 |
+
with gr.Tab("Generate Sound Effects"):
|
964 |
+
gr.Markdown(
|
965 |
+
"""
|
966 |
+
### AudioGen
|
967 |
+
"""
|
968 |
+
)
|
969 |
+
with gr.Row():
|
970 |
+
with gr.Column():
|
971 |
+
with gr.Tab("Generation"):
|
972 |
+
with gr.Accordion("Structure Prompts", open=False):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
973 |
with gr.Row():
|
974 |
+
struc_prompts_a = gr.Checkbox(label="Enable", value=False, interactive=True, container=False)
|
975 |
+
global_prompt_a = gr.Text(label="Global Prompt", interactive=True, scale=3)
|
976 |
+
with gr.Row():
|
977 |
+
s_a = gr.Slider(1, max_textboxes, value=1, step=1, label="Prompts:", interactive=True, scale=2)
|
|
|
|
|
|
|
|
|
|
|
|
|
978 |
with gr.Column():
|
979 |
+
textboxes_a = []
|
980 |
+
prompts_a = []
|
981 |
+
repeats_a = []
|
982 |
+
calcs_a = []
|
983 |
with gr.Row():
|
984 |
+
text0_a = gr.Text(label="Input Text", interactive=True, scale=4)
|
985 |
+
prompts_a.append(text0_a)
|
986 |
+
drag0_a = gr.Number(label="Repeat", value=1, interactive=True, scale=1)
|
987 |
+
repeats_a.append(drag0_a)
|
988 |
+
calc0_a = gr.Text(interactive=False, value="00:00 - 00:00", scale=1, label="Time")
|
989 |
+
calcs_a.append(calc0_a)
|
990 |
+
for i in range(max_textboxes):
|
991 |
+
with gr.Row(visible=False) as t_a:
|
992 |
+
text_a = gr.Text(label="Input Text", interactive=True, scale=3)
|
993 |
+
repeat_a = gr.Number(label="Repeat", minimum=1, value=1, interactive=True, scale=1)
|
994 |
+
calc_a = gr.Text(interactive=False, value="00:00 - 00:00", scale=1, label="Time")
|
995 |
+
textboxes_a.append(t_a)
|
996 |
+
prompts_a.append(text_a)
|
997 |
+
repeats_a.append(repeat_a)
|
998 |
+
calcs_a.append(calc_a)
|
999 |
+
to_calc_a = gr.Button("Calculate Timings", variant="secondary")
|
1000 |
+
with gr.Row():
|
1001 |
+
duration_a = gr.Slider(minimum=1, maximum=300, value=10, step=1, label="Duration", interactive=True)
|
1002 |
+
with gr.Row():
|
1003 |
+
overlap_a = gr.Slider(minimum=1, maximum=9, value=2, step=1, label="Overlap", interactive=True)
|
1004 |
+
with gr.Row():
|
1005 |
+
seed_a = gr.Number(label="Seed", value=-1, scale=4, precision=0, interactive=True)
|
1006 |
+
gr.Button('\U0001f3b2\ufe0f', scale=1).click(fn=lambda: -1, outputs=[seed_a], queue=False)
|
1007 |
+
reuse_seed_a = gr.Button('\u267b\ufe0f', scale=1)
|
1008 |
+
|
1009 |
+
with gr.Tab("Audio"):
|
1010 |
+
with gr.Row():
|
1011 |
+
with gr.Column():
|
1012 |
+
input_type_a = gr.Radio(["file", "mic"], value="file", label="Input Type (optional)", interactive=True)
|
1013 |
+
mode_a = gr.Radio(["sample"], label="Input Audio Mode (optional)", value="sample", interactive=False, visible=False)
|
1014 |
+
with gr.Row():
|
1015 |
+
trim_start_a = gr.Number(label="Trim Start", value=0, interactive=True)
|
1016 |
+
trim_end_a = gr.Number(label="Trim End", value=0, interactive=True)
|
1017 |
+
audio_a = gr.Audio(source="upload", type="numpy", label="Input Audio (optional)", interactive=True)
|
1018 |
+
|
1019 |
+
with gr.Tab("Customization"):
|
1020 |
+
with gr.Row():
|
1021 |
+
with gr.Column():
|
1022 |
+
background_a = gr.ColorPicker(value="#0f0f0f", label="background color", interactive=True, scale=0)
|
1023 |
+
bar1_a = gr.ColorPicker(value="#84cc16", label="bar color start", interactive=True, scale=0)
|
1024 |
+
bar2_a = gr.ColorPicker(value="#10b981", label="bar color end", interactive=True, scale=0)
|
1025 |
+
with gr.Column():
|
1026 |
+
image_a = gr.Image(label="Background Image", type="filepath", interactive=True, scale=4)
|
1027 |
+
with gr.Row():
|
1028 |
+
height_a = gr.Number(label="Height", value=512, interactive=True)
|
1029 |
+
width_a = gr.Number(label="Width", value=768, interactive=True)
|
1030 |
+
|
1031 |
+
with gr.Tab("Settings"):
|
1032 |
+
with gr.Row():
|
1033 |
+
channel_a = gr.Radio(["mono", "stereo", "stereo effect"], label="Output Audio Channels", value="stereo", interactive=True, scale=1)
|
1034 |
+
sr_select_a = gr.Dropdown(["11025", "16000", "22050", "24000", "32000", "44100", "48000"], label="Output Audio Sample Rate", value="48000", interactive=True)
|
1035 |
+
with gr.Row():
|
1036 |
+
model_a = gr.Radio(["medium"], label="Model", value="medium", interactive=False, visible=False)
|
1037 |
+
decoder_a = gr.Radio(["Default"], label="Decoder", value="Default", interactive=False, visible=False)
|
1038 |
+
with gr.Row():
|
1039 |
+
topk_a = gr.Number(label="Top-k", value=250, interactive=True)
|
1040 |
+
topp_a = gr.Number(label="Top-p", value=0, interactive=True)
|
1041 |
+
temperature_a = gr.Number(label="Temperature", value=1.0, interactive=True)
|
1042 |
+
cfg_coef_a = gr.Number(label="Classifier Free Guidance", value=3.0, interactive=True)
|
1043 |
with gr.Row():
|
1044 |
+
submit_a = gr.Button("Generate", variant="primary")
|
1045 |
+
_ = gr.Button("Interrupt").click(fn=interrupt, queue=False)
|
1046 |
+
with gr.Column():
|
1047 |
+
with gr.Tab("Output"):
|
1048 |
+
output_a = gr.Video(label="Generated Audio", scale=0)
|
1049 |
+
with gr.Row():
|
1050 |
+
audio_only_a = gr.Audio(type="numpy", label="Audio Only", interactive=False)
|
1051 |
+
backup_only_a = gr.Audio(type="numpy", label="Backup Audio", interactive=False, visible=False)
|
1052 |
+
send_audio_a = gr.Button("Send to Input Audio")
|
1053 |
+
seed_used_a = gr.Number(label='Seed used', value=-1, interactive=False)
|
1054 |
+
download_a = gr.File(label="Generated Files", interactive=False)
|
1055 |
+
with gr.Tab("Wiki"):
|
1056 |
gr.Markdown(
|
1057 |
"""
|
1058 |
- **[Generate (button)]:**
|