Spaces:
Runtime error
Runtime error
pablo
commited on
Commit
•
b92f46e
1
Parent(s):
bb729ac
fix
Browse files
app.py
CHANGED
@@ -232,7 +232,7 @@ def predict_images_3d(dict, depth, prompt="", negative_prompt="", guidance_scale
|
|
232 |
output_mesh = get_mesh(output_depth_vis, output_image, keep_edges=keep_edges)
|
233 |
input_mesh = get_mesh(np.array(depth_image),init_image, keep_edges=keep_edges)
|
234 |
|
235 |
-
return input_mesh, output_mesh
|
236 |
|
237 |
def create_3d_demo():
|
238 |
|
@@ -259,7 +259,7 @@ def create_3d_demo():
|
|
259 |
scheduler = gr.Dropdown(label="Schedulers", choices=schedulers, value="EulerDiscreteScheduler")
|
260 |
|
261 |
with gr.Column():
|
262 |
-
with gr.
|
263 |
result_og = gr.Model3D(label="original 3d reconstruction", clear_color=[
|
264 |
1.0, 1.0, 1.0, 1.0])
|
265 |
|
@@ -268,7 +268,7 @@ def create_3d_demo():
|
|
268 |
|
269 |
|
270 |
submit = gr.Button("Submit")
|
271 |
-
submit.click(fn=predict_images_3d, inputs=[image, depth, prompt, negative_prompt, guidance_scale, steps, strength, scheduler, checkbox], outputs=[
|
272 |
examples = gr.Examples(examples=["examples/aerial_beach.jpeg", "examples/mountains.jpeg", "examples/person_1.jpeg", "examples/ancient-carved.jpeg"],
|
273 |
inputs=[image])
|
274 |
|
|
|
232 |
output_mesh = get_mesh(output_depth_vis, output_image, keep_edges=keep_edges)
|
233 |
input_mesh = get_mesh(np.array(depth_image),init_image, keep_edges=keep_edges)
|
234 |
|
235 |
+
return input_mesh, output_mesh, gr.update(visible=True)
|
236 |
|
237 |
def create_3d_demo():
|
238 |
|
|
|
259 |
scheduler = gr.Dropdown(label="Schedulers", choices=schedulers, value="EulerDiscreteScheduler")
|
260 |
|
261 |
with gr.Column():
|
262 |
+
with gr.Row():
|
263 |
result_og = gr.Model3D(label="original 3d reconstruction", clear_color=[
|
264 |
1.0, 1.0, 1.0, 1.0])
|
265 |
|
|
|
268 |
|
269 |
|
270 |
submit = gr.Button("Submit")
|
271 |
+
submit.click(fn=predict_images_3d, inputs=[image, depth, prompt, negative_prompt, guidance_scale, steps, strength, scheduler, checkbox], outputs=[result_og, result_new, share_btn_container], api_name='run')
|
272 |
examples = gr.Examples(examples=["examples/aerial_beach.jpeg", "examples/mountains.jpeg", "examples/person_1.jpeg", "examples/ancient-carved.jpeg"],
|
273 |
inputs=[image])
|
274 |
|