Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,8 @@ def load_model(config_path, model_path, encoder, device):
|
|
24 |
# Inference function
|
25 |
def depth_estimation(image, model_path, encoder='vits'):
|
26 |
try:
|
27 |
-
|
28 |
-
device = 'cpu'
|
29 |
config_path = 'configs/config_v2_vits14.json'
|
30 |
|
31 |
# Ensure model path exists or download if needed
|
|
|
24 |
# Inference function
|
25 |
def depth_estimation(image, model_path, encoder='vits'):
|
26 |
try:
|
27 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
28 |
+
# device = 'cpu'
|
29 |
config_path = 'configs/config_v2_vits14.json'
|
30 |
|
31 |
# Ensure model path exists or download if needed
|