Spaces:
Running on Zero
Running on Zero
Pierre Chapuis commited on
fix the ClearButton update bug
Browse files
app.py
CHANGED
|
@@ -103,8 +103,8 @@ with gr.Blocks() as demo:
|
|
| 103 |
"examples/05.webp",
|
| 104 |
],
|
| 105 |
inputs=[input_image],
|
| 106 |
-
outputs=[output_slider
|
| 107 |
-
fn=process,
|
| 108 |
cache_examples=True,
|
| 109 |
cache_mode="eager",
|
| 110 |
run_on_click=False,
|
|
|
|
| 103 |
"examples/05.webp",
|
| 104 |
],
|
| 105 |
inputs=[input_image],
|
| 106 |
+
outputs=[output_slider],
|
| 107 |
+
fn=lambda image: process(image)[0], # skip the ClearButton update (breaks example caching)
|
| 108 |
cache_examples=True,
|
| 109 |
cache_mode="eager",
|
| 110 |
run_on_click=False,
|