File size: 205 Bytes
5fa1a76
 
 
 
 
 
1
2
3
4
5
6
thon
device = "cuda" if torch.cuda.is_available() else "cpu"
inputs = processor(images=image, return_tensors="pt").to(device)
pixel_values = inputs.pixel_values

Call [generate] and decode the predictions.