Update ocr.py
Browse files
ocr.py
CHANGED
|
@@ -4,7 +4,7 @@ import requests
|
|
| 4 |
from PIL import Image, ImageDraw
|
| 5 |
from transformers import AutoProcessor, Kosmos2_5ForConditionalGeneration
|
| 6 |
|
| 7 |
-
repo = "
|
| 8 |
device = "cuda:0"
|
| 9 |
dtype = torch.bfloat16
|
| 10 |
model = Kosmos2_5ForConditionalGeneration.from_pretrained(repo, device_map=device, torch_dtype=dtype)
|
|
|
|
| 4 |
from PIL import Image, ImageDraw
|
| 5 |
from transformers import AutoProcessor, Kosmos2_5ForConditionalGeneration
|
| 6 |
|
| 7 |
+
repo = "ydshieh/kosmos-2.5"
|
| 8 |
device = "cuda:0"
|
| 9 |
dtype = torch.bfloat16
|
| 10 |
model = Kosmos2_5ForConditionalGeneration.from_pretrained(repo, device_map=device, torch_dtype=dtype)
|