Lin0He commited on
Commit
bf93966
·
1 Parent(s): 8b17b62

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -1
pipeline.py CHANGED
@@ -57,7 +57,7 @@ def model_infer(model, tokenizer, review, max_length=10):
57
 
58
  # IF no EOS is generated, return after the max_len
59
  #result_text.append(tokenizer.decode(result))
60
- return result_text#sorted(result_text, key=len)[4]
61
 
62
  class PreTrainedPipeline():
63
  def __init__(self, path=""):
 
57
 
58
  # IF no EOS is generated, return after the max_len
59
  #result_text.append(tokenizer.decode(result))
60
+ return sorted(result_text, key=len)[4]
61
 
62
  class PreTrainedPipeline():
63
  def __init__(self, path=""):