Illustre commited on
Commit
0228d57
1 Parent(s): fa81db4

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +7 -8
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
- mesh = trimesh.load(ply_path.name)
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
+ # 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,