ColPali
Safetensors
English
vidore
vidore-experimental
tonywu71 commited on
Commit
5de5fe7
1 Parent(s): 0c6803e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -10
README.md CHANGED
@@ -70,16 +70,15 @@ from PIL import Image
70
 
71
  from colpali_engine.models import ColPali, ColPaliProcessor
72
 
73
- model = cast(
74
- ColPali,
75
- ColPali.from_pretrained(
76
- "vidore/colpali-v1.2",
77
- torch_dtype=torch.bfloat16,
78
- device_map="cuda:0", # or "mps" if on Apple Silicon
79
- ).eval(),
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 = [