Chesebrough commited on
Commit
48deed1
1 Parent(s): c9a8046

update some meta data, correct the code (to avoid deprecation warning)

Browse files
Files changed (1) hide show
  1. README.md +6 -2
README.md CHANGED
@@ -12,6 +12,10 @@ widget:
12
  example_title: Teapot
13
  - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
14
  example_title: Palace
 
 
 
 
15
  ---
16
 
17
  # DPT (large-sized model) fine-tuned on ADE20k
@@ -36,14 +40,14 @@ fine-tuned versions on a task that interests you.
36
  Here is how to use this model:
37
 
38
  ```python
39
- from transformers import DPTFeatureExtractor, DPTForSemanticSegmentation
40
  from PIL import Image
41
  import requests
42
 
43
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
44
  image = Image.open(requests.get(url, stream=True).raw)
45
 
46
- feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
47
  model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade")
48
 
49
  inputs = feature_extractor(images=image, return_tensors="pt")
 
12
  example_title: Teapot
13
  - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
14
  example_title: Palace
15
+ language:
16
+ - en
17
+ library_name: adapter-transformers
18
+ pipeline_tag: image-segmentation
19
  ---
20
 
21
  # DPT (large-sized model) fine-tuned on ADE20k
 
40
  Here is how to use this model:
41
 
42
  ```python
43
+ from transformers import DPTImageProcessor , DPTForSemanticSegmentation
44
  from PIL import Image
45
  import requests
46
 
47
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
48
  image = Image.open(requests.get(url, stream=True).raw)
49
 
50
+ feature_extractor = DPTImageProcessor.from_pretrained("Intel/dpt-large-ade")
51
  model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade")
52
 
53
  inputs = feature_extractor(images=image, return_tensors="pt")