Pierce Maloney commited on
Commit
60ed7ab
1 Parent(s): 000ad8b

adding intros k v l. to bad words (for testing)

Browse files
Files changed (3) hide show
  1. __pycache__/handler.cpython-311.pyc +0 -0
  2. handler.py +1 -1
  3. sample.py +1 -1
__pycache__/handler.cpython-311.pyc CHANGED
Binary files a/__pycache__/handler.cpython-311.pyc and b/__pycache__/handler.cpython-311.pyc differ
 
handler.py CHANGED
@@ -23,7 +23,7 @@ class EndpointHandler():
23
 
24
 
25
  # Bad word: id 3070, 10456 corresponds to "(*", and we do not want to output a comment
26
- bad_words_ids = [[3070], [313, 334], [10456]]
27
  if additional_bad_words_ids:
28
  bad_words_ids.extend(additional_bad_words_ids)
29
 
 
23
 
24
 
25
  # Bad word: id 3070, 10456 corresponds to "(*", and we do not want to output a comment
26
+ bad_words_ids = [[3070], [313, 334], [10456], [29871, 25956, 413, 325, 301, 29889]]
27
  if additional_bad_words_ids:
28
  bad_words_ids.extend(additional_bad_words_ids)
29
 
sample.py CHANGED
@@ -7,7 +7,7 @@ my_handler = EndpointHandler(path=".")
7
  payload = {"inputs": "I want to turn the next page of the"}
8
 
9
  # test the handler
10
- payload=my_handler(payload)
11
 
12
  # show results
13
  print("output:", payload)
 
7
  payload = {"inputs": "I want to turn the next page of the"}
8
 
9
  # test the handler
10
+ payload=my_handler(payload, additional_bad_words_ids=[[1234, 2345]])
11
 
12
  # show results
13
  print("output:", payload)