Update model.py
Browse files
model.py
CHANGED
@@ -85,16 +85,15 @@ class Model:
|
|
85 |
mode='w+b')
|
86 |
decode_latent_mesh(self.xm, latent).tri_mesh().write_ply(ply_path)
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
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 |
-
|
|
|
|
|
|
|
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 |
+
# Open the file in binary mode for reading
|
89 |
+
# with open(ply_path.name, 'rb') as file:
|
90 |
+
# data = file.read()
|
|
|
|
|
91 |
|
|
|
|
|
92 |
|
93 |
+
|
94 |
+
# outputs = [ply_path.name, data]
|
95 |
+
|
96 |
+
return ply_path.name
|
97 |
|
98 |
def run_text(self,
|
99 |
prompt: str,
|