Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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=
|
| 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.
|
| 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)
|