Update RepoPipeline.py
Browse files- RepoPipeline.py +1 -1
RepoPipeline.py
CHANGED
|
@@ -260,7 +260,7 @@ class RepoPipeline(Pipeline):
|
|
| 260 |
|
| 261 |
# Concat the embeddings of each sentence/text in vertical dimension.
|
| 262 |
return torch.zeros((1, 768), device=self.device) \
|
| 263 |
-
if
|
| 264 |
else torch.cat([self.encode(text, max_length) for text in text_sets], dim=0)
|
| 265 |
|
| 266 |
def _forward(self, extracted_infos: List, max_length=512) -> List:
|
|
|
|
| 260 |
|
| 261 |
# Concat the embeddings of each sentence/text in vertical dimension.
|
| 262 |
return torch.zeros((1, 768), device=self.device) \
|
| 263 |
+
if not text_sets \
|
| 264 |
else torch.cat([self.encode(text, max_length) for text in text_sets], dim=0)
|
| 265 |
|
| 266 |
def _forward(self, extracted_infos: List, max_length=512) -> List:
|