We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce04856 commit 305e851Copy full SHA for 305e851
1 file changed
inference/bot.py
@@ -34,7 +34,7 @@ def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwa
34
if first:
35
text = text.lstrip()
36
for stop_word in self._stop_words:
37
- for i in range(len(stop_word), 0, -1):
+ for i in range(1, len(stop_word)):
38
if self._partial_result.endswith(stop_word[0:i]):
39
self._stream_buffer += text
40
return False
0 commit comments