Harsimran19 commited on
Commit
adb98a8
1 Parent(s): 40f4856

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,4 +1,5 @@
1
  from transformers import GLPNFeatureExtractor, GLPNForDepthEstimation
 
2
  import torch
3
  import numpy as np
4
  from PIL import Image
@@ -9,8 +10,11 @@ import os
9
  # url = "http://images.cocodataset.org/val2017/000000039769.jpg"
10
  # image = Image.open(requests.get(url, stream=True).raw)
11
 
12
- feature_extractor = GLPNFeatureExtractor.from_pretrained("vinvino02/glpn-nyu")
13
- model = GLPNForDepthEstimation.from_pretrained("vinvino02/glpn-nyu")
 
 
 
14
 
15
  example_list = [["examples/" + example] for example in os.listdir("examples")]
16
 
 
1
  from transformers import GLPNFeatureExtractor, GLPNForDepthEstimation
2
+ from transformers import AutoFeatureExtractor, AutoModelForDepthEstimation
3
  import torch
4
  import numpy as np
5
  from PIL import Image
 
10
  # url = "http://images.cocodataset.org/val2017/000000039769.jpg"
11
  # image = Image.open(requests.get(url, stream=True).raw)
12
 
13
+ # feature_extractor = GLPNFeatureExtractor.from_pretrained("vinvino02/glpn-nyu")
14
+ # model = GLPNForDepthEstimation.from_pretrained("vinvino02/glpn-nyu")
15
+
16
+ feature_extractor = AutoFeatureExtractor.from_pretrained("Intel/dpt-large")
17
+ model = AutoModelForDepthEstimation.from_pretrained("Intel/dpt-large")
18
 
19
  example_list = [["examples/" + example] for example in os.listdir("examples")]
20