Update app.py
Browse files
app.py
CHANGED
@@ -81,8 +81,6 @@ def send_it1(inputs, noise_level, style, proc=proc1):
|
|
81 |
|
82 |
with gr.Blocks(css=".gradio-container {background-color: #fdf7e6;} footer{display:none !important;}",) as demo:
|
83 |
|
84 |
-
|
85 |
-
|
86 |
with gr.Column(elem_id="col-container"):
|
87 |
|
88 |
with gr.Row(variant="compact"):
|
@@ -98,15 +96,17 @@ with gr.Blocks(css=".gradio-container {background-color: #fdf7e6;} footer{displa
|
|
98 |
)
|
99 |
|
100 |
run = gr.Button("Generate Images").style(full_width=False)
|
|
|
101 |
with gr.Accordion("Advanced options", open=False):
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
110 |
|
111 |
with gr.Row():
|
112 |
with gr.Row():
|
@@ -118,7 +118,7 @@ with gr.Blocks(css=".gradio-container {background-color: #fdf7e6;} footer{displa
|
|
118 |
output2 = gr.Image(label="", show_label=False, show_share_button=False)
|
119 |
|
120 |
# Adjust the click event to include the style_selection Radio component
|
121 |
-
run.click(send_it1, inputs=[prompt, noise_level, style_selection, negative_prompt
|
122 |
-
run.click(send_it1, inputs=[prompt, noise_level, style_selection, negative_prompt
|
123 |
|
124 |
demo.launch(enable_queue=True, inline=True)
|
|
|
81 |
|
82 |
with gr.Blocks(css=".gradio-container {background-color: #fdf7e6;} footer{display:none !important;}",) as demo:
|
83 |
|
|
|
|
|
84 |
with gr.Column(elem_id="col-container"):
|
85 |
|
86 |
with gr.Row(variant="compact"):
|
|
|
96 |
)
|
97 |
|
98 |
run = gr.Button("Generate Images").style(full_width=False)
|
99 |
+
|
100 |
with gr.Accordion("Advanced options", open=False):
|
101 |
+
with gr.Row():
|
102 |
+
style_selection = gr.Radio(
|
103 |
+
show_label=True, container=True, interactive=True,
|
104 |
+
choices=IMAGE_STYLES,
|
105 |
+
value=DEFAULT_IMAGE_STYLE,
|
106 |
+
label='Image Style'
|
107 |
+
)
|
108 |
+
|
109 |
+
negative_prompt = gr.Textbox(label="Negative Prompt (Optional)", placeholder="Example: blurry, unfocused", lines=2)
|
110 |
|
111 |
with gr.Row():
|
112 |
with gr.Row():
|
|
|
118 |
output2 = gr.Image(label="", show_label=False, show_share_button=False)
|
119 |
|
120 |
# Adjust the click event to include the style_selection Radio component
|
121 |
+
run.click(send_it1, inputs=[prompt, noise_level, style_selection, negative_prompt], outputs=[output1])
|
122 |
+
run.click(send_it1, inputs=[prompt, noise_level, style_selection, negative_prompt], outputs=[output2])
|
123 |
|
124 |
demo.launch(enable_queue=True, inline=True)
|