Update app.py
Browse files
app.py
CHANGED
@@ -201,19 +201,18 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
201 |
clear_prompt.click(lambda: (None), None, [text_prompt], queue=False, show_api=False)
|
202 |
|
203 |
with gr.Column(elem_id="app-container"):
|
204 |
-
|
205 |
-
# Image output area to display the generated image
|
206 |
with gr.Row():
|
207 |
image_output = gr.Image(type="pil", label="Image Output", format="png", show_share_button=False, elem_id="gallery")
|
208 |
|
|
|
|
|
|
|
|
|
209 |
gr.Examples(
|
210 |
examples = examples,
|
211 |
inputs = [text_prompt],
|
212 |
)
|
213 |
-
with gr.Group():
|
214 |
-
with gr.Row():
|
215 |
-
clear_results = gr.Button(value="Clear Image 🗑️", variant="primary", elem_id="clear_button")
|
216 |
-
clear_results.click(lambda: (None), None, [image_output], queue=False, show_api=False)
|
217 |
|
218 |
# Bind the button to the query function with the added width and height inputs
|
219 |
text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
|
|
|
201 |
clear_prompt.click(lambda: (None), None, [text_prompt], queue=False, show_api=False)
|
202 |
|
203 |
with gr.Column(elem_id="app-container"):
|
204 |
+
# Image output area to display the generated image
|
|
|
205 |
with gr.Row():
|
206 |
image_output = gr.Image(type="pil", label="Image Output", format="png", show_share_button=False, elem_id="gallery")
|
207 |
|
208 |
+
with gr.Row():
|
209 |
+
clear_results = gr.Button(value="Clear Image 🗑️", variant="primary", elem_id="clear_button")
|
210 |
+
clear_results.click(lambda: (None), None, [image_output], queue=False, show_api=False)
|
211 |
+
|
212 |
gr.Examples(
|
213 |
examples = examples,
|
214 |
inputs = [text_prompt],
|
215 |
)
|
|
|
|
|
|
|
|
|
216 |
|
217 |
# Bind the button to the query function with the added width and height inputs
|
218 |
text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
|