Spaces:
Running
on
Zero
Running
on
Zero
thuzhaowang
commited on
Commit
·
7fa2458
1
Parent(s):
94a6f7a
update
Browse files
app.py
CHANGED
@@ -126,7 +126,7 @@ def sample(image, seed, category):
|
|
126 |
command = f"python ./scripts/generate.py --config ./configs/demo/{category}_demo.yaml --output_path {mesh_fpath} --seed {seed} --params_path {params_fpath}"
|
127 |
os.system(command)
|
128 |
|
129 |
-
return mesh_fpath
|
130 |
|
131 |
|
132 |
import gradio as gr
|
@@ -219,20 +219,20 @@ with gr.Blocks() as demo:
|
|
219 |
[os.path.join(f"examples/chair", img_name) for img_name in sorted(os.listdir(f"examples/chair"))],
|
220 |
inputs=[input_image],
|
221 |
label="Examples",
|
222 |
-
examples_per_page=
|
223 |
)
|
224 |
generator_category.change(update_examples, generator_category, outputs=examples.dataset)
|
225 |
|
226 |
with gr.Column():
|
227 |
with gr.Row():
|
228 |
with gr.Tab("Geometry"):
|
229 |
-
|
230 |
label="Output Model (Wireframe)",
|
231 |
#width=768,
|
232 |
display_mode="wireframe",
|
233 |
interactive=False
|
234 |
)
|
235 |
-
|
236 |
label="Output Model (Solid)",
|
237 |
#width=768,
|
238 |
interactive=False,
|
@@ -249,7 +249,7 @@ with gr.Blocks() as demo:
|
|
249 |
).success(
|
250 |
fn=sample,
|
251 |
inputs=[processed_image, sample_seed, generator_category],
|
252 |
-
outputs=[
|
253 |
)
|
254 |
|
255 |
demo.queue()
|
|
|
126 |
command = f"python ./scripts/generate.py --config ./configs/demo/{category}_demo.yaml --output_path {mesh_fpath} --seed {seed} --params_path {params_fpath}"
|
127 |
os.system(command)
|
128 |
|
129 |
+
return mesh_fpath, mesh_fpath
|
130 |
|
131 |
|
132 |
import gradio as gr
|
|
|
219 |
[os.path.join(f"examples/chair", img_name) for img_name in sorted(os.listdir(f"examples/chair"))],
|
220 |
inputs=[input_image],
|
221 |
label="Examples",
|
222 |
+
examples_per_page=7
|
223 |
)
|
224 |
generator_category.change(update_examples, generator_category, outputs=examples.dataset)
|
225 |
|
226 |
with gr.Column():
|
227 |
with gr.Row():
|
228 |
with gr.Tab("Geometry"):
|
229 |
+
output_model_wireframe = gr.Model3D(
|
230 |
label="Output Model (Wireframe)",
|
231 |
#width=768,
|
232 |
display_mode="wireframe",
|
233 |
interactive=False
|
234 |
)
|
235 |
+
output_model_solid = gr.Model3D(
|
236 |
label="Output Model (Solid)",
|
237 |
#width=768,
|
238 |
interactive=False,
|
|
|
249 |
).success(
|
250 |
fn=sample,
|
251 |
inputs=[processed_image, sample_seed, generator_category],
|
252 |
+
outputs=[output_model_wireframe, output_model_solid],
|
253 |
)
|
254 |
|
255 |
demo.queue()
|