Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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,
|
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=
|
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
|