Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from transformers import DPTFeatureExtractor, DPTForDepthEstimation
|
|
3 |
import torch
|
4 |
import numpy as np
|
5 |
from PIL import Image
|
|
|
6 |
|
7 |
# Load model and feature extractor
|
8 |
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large")
|
@@ -39,8 +40,8 @@ description = "Intel's DPT: Dense Prediction Transformer for depth estimation fr
|
|
39 |
|
40 |
iface = gr.Interface(
|
41 |
fn=process_image,
|
42 |
-
inputs=
|
43 |
-
outputs=
|
44 |
title=title,
|
45 |
description=description,
|
46 |
allow_flagging="never"
|
|
|
3 |
import torch
|
4 |
import numpy as np
|
5 |
from PIL import Image
|
6 |
+
from pathlib import Path
|
7 |
|
8 |
# Load model and feature extractor
|
9 |
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large")
|
|
|
40 |
|
41 |
iface = gr.Interface(
|
42 |
fn=process_image,
|
43 |
+
inputs=[input_image],
|
44 |
+
outputs=[predicted_depth],
|
45 |
title=title,
|
46 |
description=description,
|
47 |
allow_flagging="never"
|