Update medimageinsightmodel.py
#1
by
Lofay
- opened
- 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
|