chaoliangUNSW commited on
Commit
e5d7417
·
verified ·
1 Parent(s): ec580b8

Cache all examples at start-up (example clicks use no ZeroGPU quota)

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -240,7 +240,7 @@ with gr.Blocks(title="Jev-Style v3", analytics_enabled=False, elem_classes="wrap
240
  with gr.Accordion("Python", open=False):
241
  code = gr.Code(language="python", show_label=False)
242
  gr.Examples([list(e[1:]) for e in EXAMPLES], [text, question, kind, options], [out, meta, code], decide,
243
- example_labels=[e[0] for e in EXAMPLES], cache_examples=True, cache_mode="lazy",
244
  examples_per_page=len(EXAMPLES))
245
  gr.Markdown(f"[Model]({HF}{REPO}) · [GGUF]({HF}{REPO}-GGUF) · [MLX]({HF}{REPO}-MLX) · "
246
  "[jevstyle.com](https://jevstyle.com) · Not affiliated with TypeSafe, Jev or Laya.",
 
240
  with gr.Accordion("Python", open=False):
241
  code = gr.Code(language="python", show_label=False)
242
  gr.Examples([list(e[1:]) for e in EXAMPLES], [text, question, kind, options], [out, meta, code], decide,
243
+ example_labels=[e[0] for e in EXAMPLES], cache_examples=True, cache_mode="eager",
244
  examples_per_page=len(EXAMPLES))
245
  gr.Markdown(f"[Model]({HF}{REPO}) · [GGUF]({HF}{REPO}-GGUF) · [MLX]({HF}{REPO}-MLX) · "
246
  "[jevstyle.com](https://jevstyle.com) · Not affiliated with TypeSafe, Jev or Laya.",