Fix "How to use" snippet (#3)
Browse files- Fix "How to use" snippet (e7a55f51ab29709038d918ef0e24da058c04827b)
Co-authored-by: Zaid Khan <[email protected]>
README.md
CHANGED
@@ -28,9 +28,10 @@ import requests
|
|
28 |
|
29 |
import torch
|
30 |
from PIL import Image
|
31 |
-
from transformers import AutoProcessor, AutoModelForZeroShotObjectDetection
|
32 |
|
33 |
model_id = "IDEA-Research/grounding-dino-base"
|
|
|
34 |
|
35 |
processor = AutoProcessor.from_pretrained(model_id)
|
36 |
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
|
|
|
28 |
|
29 |
import torch
|
30 |
from PIL import Image
|
31 |
+
from transformers import AutoProcessor, AutoModelForZeroShotObjectDetection
|
32 |
|
33 |
model_id = "IDEA-Research/grounding-dino-base"
|
34 |
+
device = "cuda:0"
|
35 |
|
36 |
processor = AutoProcessor.from_pretrained(model_id)
|
37 |
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
|