Lin0He commited on
Commit
ce9f98a
·
1 Parent(s): b59cdb0

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -65,8 +65,8 @@ def model_infer(model, tokenizer, review, max_length=300):
65
  else: # Append to the sequence
66
  result.append(res_id)
67
 
68
- # IF no EOS is generated, return after the max_len
69
- result_text.append(tokenizer.decode(result))
70
  return sorted(result_text, key=len)[3]
71
 
72
  class EndpointHandler():
 
65
  else: # Append to the sequence
66
  result.append(res_id)
67
 
68
+ # IF no EOS is generated, return after the max_len
69
+ result_text.append(tokenizer.decode(result))
70
  return sorted(result_text, key=len)[3]
71
 
72
  class EndpointHandler():