smhh24 commited on
Commit
cdfdb5b
·
verified ·
1 Parent(s): 9d81d6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,7 +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
- device = 'cuda' if torch.cuda.is_available() else 'cpu'
 
28
  config_path = 'configs/config_v2_vits14.json'
29
 
30
  # 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