Henry65 commited on
Commit
5ded175
·
1 Parent(s): 8d6dd6b

Update RepoPipeline.py

Browse files
Files changed (1) hide show
  1. 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 text_sets is None or len(text_sets) == 0 \
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: