gangweix commited on
Commit
d28b1b0
·
verified ·
1 Parent(s): 488e860

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ css = """
35
  """
36
 
37
  DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
38
- model = PixelPerfectDepth(sampling_steps=4)
39
  ckpt_path = hf_hub_download(
40
  repo_id="gangweix/Pixel-Perfect-Depth",
41
  filename="ppd.pth",
@@ -53,7 +53,7 @@ Please refer to our [paper](), [project page](https://pixel-perfect-depth.github
53
 
54
  @spaces.GPU
55
  def predict_depth(image):
56
- return model.forward_test(image)
57
 
58
  with gr.Blocks(css=css) as demo:
59
  gr.Markdown(title)
 
35
  """
36
 
37
  DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
38
+ model = PixelPerfectDepth(sampling_steps=10)
39
  ckpt_path = hf_hub_download(
40
  repo_id="gangweix/Pixel-Perfect-Depth",
41
  filename="ppd.pth",
 
53
 
54
  @spaces.GPU
55
  def predict_depth(image):
56
+ return model.infer_image(image)
57
 
58
  with gr.Blocks(css=css) as demo:
59
  gr.Markdown(title)