DigiP-AI commited on
Commit
15d7c1e
·
verified ·
1 Parent(s): 79ddfdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -108,7 +108,8 @@ def query(lora_id, prompt, is_negative=False, steps=28, cfg_scale=3.5, sampler=
108
  except Exception as e:
109
  print(f"Error when trying to open the image: {e}")
110
  return None
111
-
 
112
 
113
  examples = [
114
  "a beautiful woman with blonde hair and blue eyes",
@@ -177,7 +178,7 @@ with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
177
  text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
178
  with gr.Row():
179
  clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
180
- clr_button.click(lambda: None, outputs=outputs)
181
 
182
  with gr.Row():
183
  image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")
 
108
  except Exception as e:
109
  print(f"Error when trying to open the image: {e}")
110
  return None
111
+ def clear():
112
+ return None
113
 
114
  examples = [
115
  "a beautiful woman with blonde hair and blue eyes",
 
178
  text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
179
  with gr.Row():
180
  clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
181
+ clr_button.click(clear, inputs=[text_prompt])
182
 
183
  with gr.Row():
184
  image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")