hwjiang commited on
Commit
8c56f29
1 Parent(s): b88f8ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -89,7 +89,7 @@ def generate(image, mc_resolution, formats=["obj", "glb"]):
89
  return mesh_path_obj.name, mesh_path_glb.name
90
 
91
  def run_example(image_pil):
92
- preprocessed = preprocess(image_pil, False, 0.9)
93
  mesh_name_obj, mesh_name_glb = generate(preprocessed, 256, ["obj", "glb"])
94
  return preprocessed, mesh_name_obj, mesh_name_glb
95
 
@@ -147,7 +147,7 @@ with gr.Blocks() as demo:
147
  ],
148
  inputs=[input_image],
149
  outputs=[processed_image, output_model_obj, output_model_glb],
150
- cache_examples=True,
151
  fn=partial(run_example),
152
  label="Examples",
153
  examples_per_page=20
 
89
  return mesh_path_obj.name, mesh_path_glb.name
90
 
91
  def run_example(image_pil):
92
+ preprocessed = preprocess(image_pil, True, 0.65)
93
  mesh_name_obj, mesh_name_glb = generate(preprocessed, 256, ["obj", "glb"])
94
  return preprocessed, mesh_name_obj, mesh_name_glb
95
 
 
147
  ],
148
  inputs=[input_image],
149
  outputs=[processed_image, output_model_obj, output_model_glb],
150
+ cache_examples="lazy",
151
  fn=partial(run_example),
152
  label="Examples",
153
  examples_per_page=20