nielsr HF staff commited on
Commit
557a3b6
1 Parent(s): 480370a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -45,8 +45,9 @@ import requests
45
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
46
  image = Image.open(requests.get(url, stream=True).raw)
47
 
48
- processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
49
- model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
 
50
 
51
  inputs = processor(images=image, return_tensors="pt")
52
  outputs = model(**inputs)
 
45
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
46
  image = Image.open(requests.get(url, stream=True).raw)
47
 
48
+ # you can specify the revision tag if you don't want the timm dependency
49
+ processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50", revision="no_timm")
50
+ model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50", revision="no_timm")
51
 
52
  inputs = processor(images=image, return_tensors="pt")
53
  outputs = model(**inputs)