piky commited on
Commit
0eda8d4
·
verified ·
1 Parent(s): 2e32330

Update app.py

Browse files

Change to tangerine

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,11 +10,11 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
10
  processor = AutoProcessor.from_pretrained(model_id)
11
  model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
12
 
13
- image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
14
  image = Image.open(requests.get(image_url, stream=True).raw)
15
  # Check for cats and remote controls
16
  # VERY important: text queries need to be lowercased + end with a dot
17
- text = "a cat. a remote control."
18
 
19
  inputs = processor(images=image, text=text, return_tensors="pt").to(device)
20
  with torch.no_grad():
 
10
  processor = AutoProcessor.from_pretrained(model_id)
11
  model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
12
 
13
+ image_url = "https://en.wikipedia.org/wiki/Tangerine#/media/File:TangerineFruit.jpg"
14
  image = Image.open(requests.get(image_url, stream=True).raw)
15
  # Check for cats and remote controls
16
  # VERY important: text queries need to be lowercased + end with a dot
17
+ text = "oranges."
18
 
19
  inputs = processor(images=image, text=text, return_tensors="pt").to(device)
20
  with torch.no_grad():