Spaces:
Runtime error
Runtime error
bug fix + cache examples
Browse files
app.py
CHANGED
@@ -180,7 +180,7 @@ def run_main_app(semantic_concept, word, script, prompt_suffix, font_name, num_s
|
|
180 |
pydiffvg.set_use_gpu(torch.cuda.is_available())
|
181 |
|
182 |
print("preprocessing")
|
183 |
-
preprocess(cfg.font, cfg.word, cfg.optimized_letter, cfg.level_of_cc)
|
184 |
filename_init = os.path.join("code/data/init/", f"{cfg.font}_{cfg.word}_scaled.svg").replace(" ", "_")
|
185 |
if not example:
|
186 |
yield gr.update(value=filename_init,visible=True),gr.update(visible=True, label='Initializing'),gr.update(visible=False),gr.update(value=cfg.caption,visible=True),gr.update(value=cfg.seed,visible=True)
|
@@ -413,7 +413,7 @@ with gr.Blocks() as demo:
|
|
413 |
result2
|
414 |
],
|
415 |
fn=run_main_ex,
|
416 |
-
cache_examples=
|
417 |
|
418 |
|
419 |
# inputs
|
|
|
180 |
pydiffvg.set_use_gpu(torch.cuda.is_available())
|
181 |
|
182 |
print("preprocessing")
|
183 |
+
preprocess(cfg.font, cfg.word, cfg.optimized_letter, cfg.script, cfg.level_of_cc)
|
184 |
filename_init = os.path.join("code/data/init/", f"{cfg.font}_{cfg.word}_scaled.svg").replace(" ", "_")
|
185 |
if not example:
|
186 |
yield gr.update(value=filename_init,visible=True),gr.update(visible=True, label='Initializing'),gr.update(visible=False),gr.update(value=cfg.caption,visible=True),gr.update(value=cfg.seed,visible=True)
|
|
|
413 |
result2
|
414 |
],
|
415 |
fn=run_main_ex,
|
416 |
+
cache_examples=True)
|
417 |
|
418 |
|
419 |
# inputs
|