not-lain commited on
Commit
bbf6b0e
1 Parent(s): 2758806

Update app.py

Browse files

cache examples but in lazy mode (first time only),
because this space is running in CPU it might be a good choice to cache your examples instead of letting each user wait for the CPU to finish running.

documentation: https://www.gradio.app/docs/examples

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -56,7 +56,7 @@ if __name__=="__main__":
56
  inputs = [img, labels, threshold, bounding_box_selection],
57
  outputs = [fig],
58
  fn=app_fn,
59
- cache_examples=False,
60
  label='Try this example input!'
61
  )
62
 
 
56
  inputs = [img, labels, threshold, bounding_box_selection],
57
  outputs = [fig],
58
  fn=app_fn,
59
+ cache_examples="lazy",
60
  label='Try this example input!'
61
  )
62