Spaces:
Running
on
Zero
Running
on
Zero
Update mesh.py
Browse files
mesh.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from zoedepth.utils.geometry import depth_to_points, create_triangles
|
2 |
import gradio as gr
|
|
|
3 |
import numpy as np
|
4 |
from PIL import Image
|
5 |
import trimesh
|
@@ -52,6 +53,7 @@ def get_mesh(model, image: Image.Image, keep_edges=True):
|
|
52 |
mesh.export(glb_path)
|
53 |
return glb_path
|
54 |
|
|
|
55 |
def mesh_interface(model):
|
56 |
with gr.Row():
|
57 |
with gr.Column():
|
|
|
1 |
from zoedepth.utils.geometry import depth_to_points, create_triangles
|
2 |
import gradio as gr
|
3 |
+
import spaces
|
4 |
import numpy as np
|
5 |
from PIL import Image
|
6 |
import trimesh
|
|
|
53 |
mesh.export(glb_path)
|
54 |
return glb_path
|
55 |
|
56 |
+
@spaces.GPU
|
57 |
def mesh_interface(model):
|
58 |
with gr.Row():
|
59 |
with gr.Column():
|