Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ css = """
|
|
21 |
|
22 |
"""
|
23 |
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
|
24 |
-
model = torch.hub.load('isl-org/ZoeDepth', "ZoeD_N", pretrained=True).to(
|
25 |
|
26 |
# config_mode="infer"
|
27 |
# pretrained_resource = f"local::C:/Users/Charl/.cache/torch/hub/checkpoints/ZoeD_M12_N.pt"
|
@@ -35,9 +35,9 @@ with gr.Blocks(css=css) as API:
|
|
35 |
# gr.Markdown(title)
|
36 |
# gr.Markdown(description)
|
37 |
with gr.Tab("Depth Prediction"):
|
38 |
-
depth_interface(model)
|
39 |
with gr.Tab("Image to 3D"):
|
40 |
-
mesh_interface(model)
|
41 |
# with gr.Tab("360 Panorama to 3D"):
|
42 |
# create_pano_to_3d_demo(model)
|
43 |
|
|
|
21 |
|
22 |
"""
|
23 |
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
|
24 |
+
model = torch.hub.load('isl-org/ZoeDepth', "ZoeD_N", pretrained=True).to("cpu").eval()
|
25 |
|
26 |
# config_mode="infer"
|
27 |
# pretrained_resource = f"local::C:/Users/Charl/.cache/torch/hub/checkpoints/ZoeD_M12_N.pt"
|
|
|
35 |
# gr.Markdown(title)
|
36 |
# gr.Markdown(description)
|
37 |
with gr.Tab("Depth Prediction"):
|
38 |
+
depth_interface(model, DEVICE)
|
39 |
with gr.Tab("Image to 3D"):
|
40 |
+
mesh_interface(model, DEVICE)
|
41 |
# with gr.Tab("360 Panorama to 3D"):
|
42 |
# create_pano_to_3d_demo(model)
|
43 |
|