Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,16 +29,11 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", fill_width=True, css=css) as demo:
|
|
29 |
with gr.Row():
|
30 |
with gr.Column(scale=10):
|
31 |
with gr.Group():
|
32 |
-
with gr.Accordion("Prompt Transformer", open=False):
|
33 |
-
with gr.Row(equal_height=True):
|
34 |
-
v2_rating = gr.Radio(label="Rating", choices=list(V2_RATING_OPTIONS), value="sfw")
|
35 |
-
v2_aspect_ratio = gr.Radio(label="Aspect ratio", info="The aspect ratio of the image.", choices=list(V2_ASPECT_RATIO_OPTIONS), value="square", visible=False)
|
36 |
-
v2_length = gr.Radio(label="Length", info="The total length of the tags.", choices=list(V2_LENGTH_OPTIONS), value="long")
|
37 |
-
|
38 |
-
|
39 |
prompt = gr.Text(label="Prompt", lines=2, max_lines=8, placeholder="1girl, solo, ...", show_copy_button=True)
|
40 |
with gr.Accordion("Advanced options", open=False):
|
41 |
neg_prompt = gr.Text(label="Negative Prompt", lines=1, max_lines=8, placeholder="")
|
|
|
|
|
42 |
with gr.Row(equal_height=True):
|
43 |
width = gr.Slider(label="Width", maximum=1216, step=32, value=0)
|
44 |
height = gr.Slider(label="Height", maximum=1216, step=32, value=0)
|
@@ -96,7 +91,6 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", fill_width=True, css=css) as demo:
|
|
96 |
#stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event, gen_event2], show_api=False)
|
97 |
|
98 |
|
99 |
-
clear_results.click(lambda: (None, None), None, [results, image_files], queue=False, show_api=False)
|
100 |
recom_prompt_preset.change(set_recom_prompt_preset, [recom_prompt_preset],
|
101 |
[positive_prefix, positive_suffix, negative_prefix, negative_suffix], queue=False, show_api=False)
|
102 |
seed_rand.click(randomize_seed, None, [seed], queue=False, show_api=False)
|
|
|
29 |
with gr.Row():
|
30 |
with gr.Column(scale=10):
|
31 |
with gr.Group():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
prompt = gr.Text(label="Prompt", lines=2, max_lines=8, placeholder="1girl, solo, ...", show_copy_button=True)
|
33 |
with gr.Accordion("Advanced options", open=False):
|
34 |
neg_prompt = gr.Text(label="Negative Prompt", lines=1, max_lines=8, placeholder="")
|
35 |
+
v2_rating = gr.Radio(label="Rating", choices=list(V2_RATING_OPTIONS), value="explicit")
|
36 |
+
v2_aspect_ratio = gr.Radio(label="Aspect ratio", info="The aspect ratio of the image.", choices=list(V2_ASPECT_RATIO_OPTIONS), value="square", visible=False)
|
37 |
with gr.Row(equal_height=True):
|
38 |
width = gr.Slider(label="Width", maximum=1216, step=32, value=0)
|
39 |
height = gr.Slider(label="Height", maximum=1216, step=32, value=0)
|
|
|
91 |
#stop_button.click(lambda: gr.update(interactive=False), None, stop_button, cancels=[gen_event, gen_event2], show_api=False)
|
92 |
|
93 |
|
|
|
94 |
recom_prompt_preset.change(set_recom_prompt_preset, [recom_prompt_preset],
|
95 |
[positive_prefix, positive_suffix, negative_prefix, negative_suffix], queue=False, show_api=False)
|
96 |
seed_rand.click(randomize_seed, None, [seed], queue=False, show_api=False)
|