Pierre Chapuis commited on
Commit
992d011
·
unverified ·
1 Parent(s): 2b71370

fix the ClearButton update bug

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, run_button],
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,