Pierce Maloney
commited on
Commit
•
b29c898
1
Parent(s):
392d92f
banning token 13
Browse files- handler.py +2 -1
handler.py
CHANGED
@@ -23,7 +23,8 @@ class EndpointHandler():
|
|
23 |
|
24 |
|
25 |
# Bad word: id 3070, 10456 corresponds to "(*", and we do not want to output a comment
|
26 |
-
|
|
|
27 |
|
28 |
input_ids = self.tokenizer.encode(inputs, return_tensors="pt")
|
29 |
|
|
|
23 |
|
24 |
|
25 |
# Bad word: id 3070, 10456 corresponds to "(*", and we do not want to output a comment
|
26 |
+
# 13 is a newline character
|
27 |
+
bad_words_ids = [[3070], [313, 334], [10456], [13]]
|
28 |
|
29 |
input_ids = self.tokenizer.encode(inputs, return_tensors="pt")
|
30 |
|