Spaces:
Runtime error
Runtime error
wp
Browse files
app.py
CHANGED
@@ -146,8 +146,7 @@ def ply_to_glb(ply_file, glb_file):
|
|
146 |
|
147 |
def save_ply(pc, file_name, grid_size):
|
148 |
# Produce a mesh (with vertex colors)
|
149 |
-
|
150 |
-
write_ply(f, pc)
|
151 |
|
152 |
|
153 |
def create_gif(pc):
|
@@ -259,7 +258,6 @@ with block:
|
|
259 |
with gr.Column():
|
260 |
model_gif = gr.Video(label="3D Model GIF")
|
261 |
# btn_pc_to_obj = gr.Button(value="Convert to OBJ", visible=False)
|
262 |
-
model_3d = gr.Model3D(value=None)
|
263 |
file_out = gr.File(label="Files", visible=False)
|
264 |
|
265 |
if torch.cuda.is_available():
|
@@ -269,7 +267,7 @@ with block:
|
|
269 |
["images/fantasy_world.png"],
|
270 |
],
|
271 |
inputs=[input_image],
|
272 |
-
outputs=[
|
273 |
fn=generate_3D,
|
274 |
cache_examples=True
|
275 |
)
|
|
|
146 |
|
147 |
def save_ply(pc, file_name, grid_size):
|
148 |
# Produce a mesh (with vertex colors)
|
149 |
+
pc.save(file_name)
|
|
|
150 |
|
151 |
|
152 |
def create_gif(pc):
|
|
|
258 |
with gr.Column():
|
259 |
model_gif = gr.Video(label="3D Model GIF")
|
260 |
# btn_pc_to_obj = gr.Button(value="Convert to OBJ", visible=False)
|
|
|
261 |
file_out = gr.File(label="Files", visible=False)
|
262 |
|
263 |
if torch.cuda.is_available():
|
|
|
267 |
["images/fantasy_world.png"],
|
268 |
],
|
269 |
inputs=[input_image],
|
270 |
+
outputs=[model_gif, file_out],
|
271 |
fn=generate_3D,
|
272 |
cache_examples=True
|
273 |
)
|