Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -108,6 +108,7 @@ 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 |
def clear():
|
112 |
return None
|
113 |
|
@@ -176,12 +177,17 @@ with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
|
|
176 |
|
177 |
with gr.Row():
|
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(lambda: gr.Textbox(value=""), None, text_prompt)
|
182 |
-
|
183 |
with gr.Row():
|
184 |
image_output = gr.Image(type="pil", label="Image Output", format="png", elem_id="gallery")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
gr.Examples(
|
187 |
examples = examples,
|
|
|
108 |
except Exception as e:
|
109 |
print(f"Error when trying to open the image: {e}")
|
110 |
return None
|
111 |
+
|
112 |
def clear():
|
113 |
return None
|
114 |
|
|
|
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 |
|
192 |
gr.Examples(
|
193 |
examples = examples,
|