Spaces:
Runtime error
Runtime error
Linoy Tsaban
commited on
Commit
•
3cc82a2
1
Parent(s):
7b367e9
Update app.py
Browse files
app.py
CHANGED
@@ -132,6 +132,9 @@ def invert_and_reconstruct(
|
|
132 |
inversion_map['wts'] = wts
|
133 |
|
134 |
return pure_ddpm_out
|
|
|
|
|
|
|
135 |
|
136 |
def edit(input_image,
|
137 |
src_prompt ="",
|
@@ -316,6 +319,10 @@ with gr.Blocks() as demo:
|
|
316 |
outputs=[sega_edited_image],
|
317 |
)
|
318 |
|
|
|
|
|
|
|
|
|
319 |
gr.Examples(
|
320 |
label='Examples',
|
321 |
examples=get_example(),
|
|
|
132 |
inversion_map['wts'] = wts
|
133 |
|
134 |
return pure_ddpm_out
|
135 |
+
|
136 |
+
def reset():
|
137 |
+
inversion_map.clear()
|
138 |
|
139 |
def edit(input_image,
|
140 |
src_prompt ="",
|
|
|
319 |
outputs=[sega_edited_image],
|
320 |
)
|
321 |
|
322 |
+
input_image.change(
|
323 |
+
fn = reset
|
324 |
+
)
|
325 |
+
|
326 |
gr.Examples(
|
327 |
label='Examples',
|
328 |
examples=get_example(),
|