Update README.md
Browse files
README.md
CHANGED
@@ -18,8 +18,8 @@ base_model: Salesforce/blip2-opt-2.7b-coco
|
|
18 |
|
19 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
20 |
|
21 |
-
processor = Blip2Processor.from_pretrained("kkatiz/THAI-BLIP-2
|
22 |
-
model = Blip2ForConditionalGeneration.from_pretrained("kkatiz/THAI-BLIP-2
|
23 |
|
24 |
img = Image.open("Your image...")
|
25 |
inputs = processor(images=img, return_tensors="pt").to(device, torch.bfloat16)
|
|
|
18 |
|
19 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
20 |
|
21 |
+
processor = Blip2Processor.from_pretrained("kkatiz/THAI-BLIP-2")
|
22 |
+
model = Blip2ForConditionalGeneration.from_pretrained("kkatiz/THAI-BLIP-2", device_map=device, torch_dtype=torch.bfloat16)
|
23 |
|
24 |
img = Image.open("Your image...")
|
25 |
inputs = processor(images=img, return_tensors="pt").to(device, torch.bfloat16)
|