Update app.py
Browse files
app.py
CHANGED
@@ -202,23 +202,23 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
202 |
clear_prompt.click(lambda: (None), None, [text_prompt], queue=False, show_api=False)
|
203 |
|
204 |
with gr.Column(elem_id="app-container"):
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
image_output = gr.Image(type="pil", label="Image Output", format="png", show_share_button=False, elem_id="gallery")
|
209 |
|
210 |
gr.Examples(
|
211 |
examples = examples,
|
212 |
inputs = [text_prompt],
|
213 |
)
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
|
219 |
# Bind the button to the query function with the added width and height inputs
|
220 |
|
221 |
text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
|
|
|
222 |
with gr.TabItem("π Flip Image", visible=True):
|
223 |
with gr.Column():
|
224 |
with gr.Row():
|
|
|
202 |
clear_prompt.click(lambda: (None), None, [text_prompt], queue=False, show_api=False)
|
203 |
|
204 |
with gr.Column(elem_id="app-container"):
|
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 |
|
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 |
|
220 |
text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
|
221 |
+
|
222 |
with gr.TabItem("π Flip Image", visible=True):
|
223 |
with gr.Column():
|
224 |
with gr.Row():
|