Spaces:
Running
on
Zero
Running
on
Zero
set resize to 1 to avoid error
Browse files
app.py
CHANGED
@@ -9,7 +9,11 @@ import torch
|
|
9 |
import tempfile
|
10 |
import os
|
11 |
import trimesh
|
12 |
-
import time
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# Run the script to download pretrained models
|
15 |
subprocess.run(["bash", "get_pretrained_models.sh"])
|
@@ -206,6 +210,7 @@ iface = gr.Interface(
|
|
206 |
title="DepthPro Demo with 3D Visualization",
|
207 |
description=(
|
208 |
"An enhanced demo that creates a textured 3D model from the input image and depth map.\n\n"
|
|
|
209 |
"**Instructions:**\n"
|
210 |
"1. Upload an image.\n"
|
211 |
"2. The app will predict the depth map, display it, and provide the focal length.\n"
|
|
|
9 |
import tempfile
|
10 |
import os
|
11 |
import trimesh
|
12 |
+
import time
|
13 |
+
import timm # Add this import
|
14 |
+
|
15 |
+
# Ensure timm is properly loaded
|
16 |
+
print(f"Timm version: {timm.__version__}")
|
17 |
|
18 |
# Run the script to download pretrained models
|
19 |
subprocess.run(["bash", "get_pretrained_models.sh"])
|
|
|
210 |
title="DepthPro Demo with 3D Visualization",
|
211 |
description=(
|
212 |
"An enhanced demo that creates a textured 3D model from the input image and depth map.\n\n"
|
213 |
+
"Forked from https://huggingface.co/spaces/akhaliq/depth-pro and model from https://huggingface.co/apple/DepthPro"
|
214 |
"**Instructions:**\n"
|
215 |
"1. Upload an image.\n"
|
216 |
"2. The app will predict the depth map, display it, and provide the focal length.\n"
|