DigiP-AI commited on
Commit
80ed5f4
·
verified ·
1 Parent(s): 8f06795

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -110,7 +110,8 @@ def query(lora_id, prompt, is_negative=False, steps=28, cfg_scale=3.5, sampler=
110
  return None
111
 
112
  def clear():
113
- return None
 
114
 
115
  examples = [
116
  "a beautiful woman with blonde hair and blue eyes",
@@ -177,15 +178,15 @@ 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
- with gr.Row():
181
- image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")
182
 
183
  with gr.Row():
184
  clear_btn = gr.Button(value="Clear",variant="primary", elem_id="clear_button")
185
- clear_btn.click(clear, inputs=[], outputs=[image_output])
186
  #clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
187
  #clr_button.click(lambda: gr.Textbox(value=""), None, text_prompt)
188
-
 
189
  #with gr.Row():
190
  #image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")
191
 
 
110
  return None
111
 
112
  def clear():
113
+ image_output.clear()
114
+ return None
115
 
116
  examples = [
117
  "a beautiful woman with blonde hair and blue eyes",
 
178
 
179
  with gr.Row():
180
  text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
181
+
 
182
 
183
  with gr.Row():
184
  clear_btn = gr.Button(value="Clear",variant="primary", elem_id="clear_button")
185
+ clear_btn.click(clear, inputs=[text_prompt], outputs=[image_output])
186
  #clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
187
  #clr_button.click(lambda: gr.Textbox(value=""), None, text_prompt)
188
+ with gr.Row():
189
+ image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")
190
  #with gr.Row():
191
  #image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")
192