Update README.md
Browse files
README.md
CHANGED
@@ -70,16 +70,15 @@ from PIL import Image
|
|
70 |
|
71 |
from colpali_engine.models import ColPali, ColPaliProcessor
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
processor = cast(ColPaliProcessor, ColPaliProcessor.from_pretrained("vidore/colpali-v1.2"))
|
83 |
|
84 |
# Your inputs
|
85 |
images = [
|
|
|
70 |
|
71 |
from colpali_engine.models import ColPali, ColPaliProcessor
|
72 |
|
73 |
+
model_name = "vidore/colpali-v1.2"
|
74 |
+
|
75 |
+
model = ColPali.from_pretrained(
|
76 |
+
model_name,
|
77 |
+
torch_dtype=torch.bfloat16,
|
78 |
+
device_map="cuda:0", # or "mps" if on Apple Silicon
|
79 |
+
).eval()
|
80 |
+
|
81 |
+
processor = ColPaliProcessor.from_pretrained(model_name)
|
|
|
82 |
|
83 |
# Your inputs
|
84 |
images = [
|