Update pipeline.py
Browse files- 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
|
| 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=""):
|