Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -177,16 +177,16 @@ with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
|
|
177 |
|
178 |
with gr.Row():
|
179 |
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|
|
|
|
|
|
|
180 |
|
181 |
-
|
182 |
with gr.Row():
|
183 |
image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")
|
184 |
|
185 |
with gr.Row():
|
186 |
-
|
187 |
-
|
188 |
-
clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
|
189 |
-
clr_button.click([lambda: gr.Textbox(value=""), None, text_prompt], [lambda: gr.Image(value=""), None, image_output])
|
190 |
|
191 |
|
192 |
|
|
|
177 |
|
178 |
with gr.Row():
|
179 |
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|
180 |
+
with gr.Row():
|
181 |
+
clr_button =gr.Button("Clear prompt",variant="primary", elem_id="clear_button")
|
182 |
+
clr_button.click(lambda: gr.Textbox(value=""), None, text_prompt)
|
183 |
|
|
|
184 |
with gr.Row():
|
185 |
image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")
|
186 |
|
187 |
with gr.Row():
|
188 |
+
clear_btn = gr.Button(value="Clear Image",variant="primary", elem_id="clear_button")
|
189 |
+
clear_btn.click(clear, inputs=[ ], outputs=[image_output])
|
|
|
|
|
190 |
|
191 |
|
192 |
|