nielsr HF staff commited on
Commit
a2bb814
1 Parent(s): ec37772

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -0
README.md CHANGED
@@ -39,6 +39,7 @@ model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
39
  image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
40
  image = Image.open(requests.get(image_url, stream=True).raw)
41
  # Check for cats and remote controls
 
42
  text = "a cat. a remote control."
43
 
44
  inputs = processor(images=image, text=text, return_tensors="pt").to(device)
 
39
  image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
40
  image = Image.open(requests.get(image_url, stream=True).raw)
41
  # Check for cats and remote controls
42
+ # VERY important: text queries need to be lowercased + end with a dot
43
  text = "a cat. a remote control."
44
 
45
  inputs = processor(images=image, text=text, return_tensors="pt").to(device)