Update model.py
Browse files
model.py
CHANGED
@@ -85,16 +85,7 @@ class Model:
|
|
85 |
mode='w+b')
|
86 |
decode_latent_mesh(self.xm, latent).tri_mesh().write_ply(ply_path)
|
87 |
|
88 |
-
|
89 |
-
rot = trimesh.transformations.rotation_matrix(-np.pi / 2, [1, 0, 0])
|
90 |
-
mesh = mesh.apply_transform(rot)
|
91 |
-
rot = trimesh.transformations.rotation_matrix(np.pi, [0, 1, 0])
|
92 |
-
mesh = mesh.apply_transform(rot)
|
93 |
-
|
94 |
-
mesh_path = tempfile.NamedTemporaryFile(suffix='.glb', delete=False)
|
95 |
-
mesh.export(mesh_path.name, file_type='glb')
|
96 |
-
|
97 |
-
return mesh_path.name
|
98 |
|
99 |
def run_text(self,
|
100 |
prompt: str,
|
|
|
85 |
mode='w+b')
|
86 |
decode_latent_mesh(self.xm, latent).tri_mesh().write_ply(ply_path)
|
87 |
|
88 |
+
return ply_path.name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
def run_text(self,
|
91 |
prompt: str,
|