Spaces:
Runtime error
Runtime error
save as npz
Browse files
app.py
CHANGED
@@ -119,10 +119,10 @@ def generate_3D(input, model_name='base1B', guidance_scale=3.0, grid_size=128):
|
|
119 |
set_state('Converting to mesh...')
|
120 |
|
121 |
uniqid = uuid.uuid4()
|
122 |
-
file_path = f'/tmp/mesh-{uniqid}.
|
123 |
|
124 |
print(file_path)
|
125 |
-
|
126 |
|
127 |
set_state('')
|
128 |
|
@@ -150,11 +150,6 @@ def ply_to_glb(ply_file, glb_file):
|
|
150 |
|
151 |
return glb_file
|
152 |
|
153 |
-
def save_ply(pc, file_name):
|
154 |
-
# Produce a mesh (with vertex colors)
|
155 |
-
with open(file_name, 'wb') as f:
|
156 |
-
pc.write_ply(f)
|
157 |
-
|
158 |
|
159 |
def create_gif(pc):
|
160 |
fig = plt.figure(facecolor='black', figsize=(4, 4))
|
|
|
119 |
set_state('Converting to mesh...')
|
120 |
|
121 |
uniqid = uuid.uuid4()
|
122 |
+
file_path = f'/tmp/mesh-{uniqid}.npz'
|
123 |
|
124 |
print(file_path)
|
125 |
+
pc.save(file_path)
|
126 |
|
127 |
set_state('')
|
128 |
|
|
|
150 |
|
151 |
return glb_file
|
152 |
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
def create_gif(pc):
|
155 |
fig = plt.figure(facecolor='black', figsize=(4, 4))
|