lvwerra HF staff commited on
Commit
c29119d
1 Parent(s): 6e419a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -79,7 +79,7 @@ def generate(
79
 
80
  previous_token = ""
81
  for response in stream:
82
- if response.token.text in [EOS_STRING, EOT_STRING]:
83
  if fim_mode:
84
  output += suffix
85
  else:
 
79
 
80
  previous_token = ""
81
  for response in stream:
82
+ if any([end_token in response.token.text for end_token in [EOS_STRING, EOT_STRING]]):
83
  if fim_mode:
84
  output += suffix
85
  else: