Visual Document Retrieval
ColPali
Safetensors
English
vidore-experimental
vidore
manuel commited on
Commit
39d194f
·
1 Parent(s): 24dbd9c
Files changed (1) hide show
  1. handler.py +5 -2
handler.py CHANGED
@@ -79,8 +79,11 @@ class EndpointHandler():
79
  elif input_type == "processed_images":
80
  try:
81
  binary = base64.b64decode(inputs)
82
- batch = torch.load(io.BytesIO(inputs), map_location=self.model.device)
83
- print(batch)
 
 
 
84
  except Exception as e:
85
  return {"error": f"Error processing preprocessed images: {str(e)}"}
86
 
 
79
  elif input_type == "processed_images":
80
  try:
81
  binary = base64.b64decode(inputs)
82
+ print("decoded binary")
83
+ buffer = io.BytesIO(binary)
84
+ print("buffered")
85
+ batch = torch.load(buffer, map_location=self.model.device)
86
+ print("loaded as torch")
87
  except Exception as e:
88
  return {"error": f"Error processing preprocessed images: {str(e)}"}
89