LiheYoung commited on
Commit
d2ba2b6
1 Parent(s): 5ae26f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import cv2
3
  import numpy as np
4
  import os
5
  from PIL import Image
 
6
  import torch
7
  import torch.nn.functional as F
8
  from torchvision.transforms import Compose
@@ -44,7 +45,7 @@ transform = Compose([
44
  PrepareForNet(),
45
  ])
46
 
47
-
48
  @torch.no_grad()
49
  def predict_depth(model, image):
50
  return model(image)
 
3
  import numpy as np
4
  import os
5
  from PIL import Image
6
+ import spaces
7
  import torch
8
  import torch.nn.functional as F
9
  from torchvision.transforms import Compose
 
45
  PrepareForNet(),
46
  ])
47
 
48
+ @spaces.GPU
49
  @torch.no_grad()
50
  def predict_depth(model, image):
51
  return model(image)