Spaces:
Running
on
Zero
Running
on
Zero
Allow examples to be lazy cached
#2
by
abidlabs
HF Staff
- opened
app.py
CHANGED
@@ -331,7 +331,7 @@ def do_inference(input_3d, dilated_offset=0.0, sample_seed=0, do_sampling=False,
|
|
331 |
import gradio as gr
|
332 |
|
333 |
@spaces.GPU
|
334 |
-
def process_3d_model(input_3d, dilated_offset, do_marching_cubes, postprocess_method="postprocess1"):
|
335 |
print(f"processing: {input_3d}")
|
336 |
# try:
|
337 |
preprocess_model_obj, output_model_obj, output_model_json = do_inference(
|
@@ -412,6 +412,8 @@ with gr.Blocks(title="PrimitiveAnything: Human-Crafted 3D Primitive Assembly Gen
|
|
412 |
example = gr.Examples(
|
413 |
examples=example_files,
|
414 |
inputs=[input_3d], # Only include the Model3D input
|
|
|
|
|
415 |
examples_per_page=14,
|
416 |
)
|
417 |
|
|
|
331 |
import gradio as gr
|
332 |
|
333 |
@spaces.GPU
|
334 |
+
def process_3d_model(input_3d, dilated_offset=0.015, do_marching_cubes=True, postprocess_method="postprocess1"):
|
335 |
print(f"processing: {input_3d}")
|
336 |
# try:
|
337 |
preprocess_model_obj, output_model_obj, output_model_json = do_inference(
|
|
|
412 |
example = gr.Examples(
|
413 |
examples=example_files,
|
414 |
inputs=[input_3d], # Only include the Model3D input
|
415 |
+
fn=process_3d_model,
|
416 |
+
outputs=[output_3d, output_json],
|
417 |
examples_per_page=14,
|
418 |
)
|
419 |
|