Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -202,6 +202,10 @@ def extract_glb(
|
|
| 202 |
gs, mesh = unpack_state(state)
|
| 203 |
glb = postprocessing_utils.to_glb(gs, mesh, simplify=mesh_simplify, texture_size=texture_size, verbose=False)
|
| 204 |
glb_path = os.path.join(user_dir, 'sample.glb')
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
glb.export(glb_path)
|
| 206 |
torch.cuda.empty_cache()
|
| 207 |
return glb_path, glb_path
|
|
|
|
| 202 |
gs, mesh = unpack_state(state)
|
| 203 |
glb = postprocessing_utils.to_glb(gs, mesh, simplify=mesh_simplify, texture_size=texture_size, verbose=False)
|
| 204 |
glb_path = os.path.join(user_dir, 'sample.glb')
|
| 205 |
+
|
| 206 |
+
import aspose.threed as a3d
|
| 207 |
+
scene = a3d.Scene.from_file(glb_path)
|
| 208 |
+
scene.save(os.path.join(user_dir), 'print-me.3MF'
|
| 209 |
glb.export(glb_path)
|
| 210 |
torch.cuda.empty_cache()
|
| 211 |
return glb_path, glb_path
|