medical
Lofay commited on
Commit
d993fd9
1 Parent(s): 8b332db

Update medimageinsightmodel.py

Browse files
Files changed (1) hide show
  1. medimageinsightmodel.py +1 -1
medimageinsightmodel.py CHANGED
@@ -185,7 +185,7 @@ class MedImageInsight:
185
 
186
  # Move text tensors to the correct device
187
  text_tokens = {k: v.to(self.device) for k, v in text_tokens.items()}
188
- output["text_embeddings"] = self.model.encode_text(text_tokens).cpu().numpy()
189
 
190
 
191
  return output
 
185
 
186
  # Move text tensors to the correct device
187
  text_tokens = {k: v.to(self.device) for k, v in text_tokens.items()}
188
+ output["text_embeddings"] = self.model.encode_text(text_tokens).detach().cpu().numpy()
189
 
190
 
191
  return output