paulb34 commited on
Commit
2392de1
·
verified ·
1 Parent(s): 27ad521

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -120,7 +120,10 @@ with gr.Blocks(theme=theme, css=css) as app:
120
  # Image output area to display the generated image
121
  with gr.Row():
122
  image_output = gr.Image(type="pil", label="Image Output", show_share_button=False, elem_id="gallery")
123
-
 
 
 
124
  with gr.Row():
125
  gr.Examples(
126
  examples = examples,
 
120
  # Image output area to display the generated image
121
  with gr.Row():
122
  image_output = gr.Image(type="pil", label="Image Output", show_share_button=False, elem_id="gallery")
123
+ with gr.Row():
124
+ clear_prompt =gr.Button("Clear 🗑️",variant="primary", elem_id="clear_button")
125
+ clear_prompt.click(lambda: (None, None), None, [text_prompt, image_output], queue=False, show_api=False)
126
+
127
  with gr.Row():
128
  gr.Examples(
129
  examples = examples,