Spaces:
Sleeping
Sleeping
Commit
·
18dad0f
1
Parent(s):
3c3389c
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
import numpy as np
|
5 |
from PIL import Image
|
6 |
|
7 |
-
|
8 |
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large")
|
9 |
model = DPTForDepthEstimation.from_pretrained("Intel/dpt-large")
|
10 |
|
@@ -33,7 +33,7 @@ def process_image(image):
|
|
33 |
|
34 |
title = "Depth Estimation"
|
35 |
description = "Upload an image and get the depth visualization"
|
36 |
-
examples =[['
|
37 |
# examples =[['house.jpg'], ['plane.webp'], ['room.webp']]
|
38 |
|
39 |
iface = gr.Interface(fn=process_image,
|
|
|
4 |
import numpy as np
|
5 |
from PIL import Image
|
6 |
|
7 |
+
torch.hub.download_url_to_file('http://images.cocodataset.org/val2017/000000039769.jpg', 'cats.jpg')
|
8 |
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large")
|
9 |
model = DPTForDepthEstimation.from_pretrained("Intel/dpt-large")
|
10 |
|
|
|
33 |
|
34 |
title = "Depth Estimation"
|
35 |
description = "Upload an image and get the depth visualization"
|
36 |
+
examples =[['cats.jpg']]
|
37 |
# examples =[['house.jpg'], ['plane.webp'], ['room.webp']]
|
38 |
|
39 |
iface = gr.Interface(fn=process_image,
|