yetessam commited on
Commit
1503c04
·
verified ·
1 Parent(s): 952ed51

Update tools/polite_guard.py

Browse files
Files changed (1) hide show
  1. tools/polite_guard.py +3 -3
tools/polite_guard.py CHANGED
@@ -43,10 +43,10 @@ class PoliteGuardTool(Tool):
43
  """
44
  try:
45
  classifier = pipeline("text-classification",
46
- "Intel/polite-guard",
47
- return_all_scores=True, # <-- get all four probabilities in one call
48
- truncation=True
49
  )
 
 
50
  result = classifier(input_text)
51
  print(f"return {str(result)}")
52
  output = result[0]
 
43
  """
44
  try:
45
  classifier = pipeline("text-classification",
46
+ "Intel/polite-guard"
 
 
47
  )
48
+ # return_all_scores=True, # <-- get all four probabilities in one call
49
+ # truncation=True
50
  result = classifier(input_text)
51
  print(f"return {str(result)}")
52
  output = result[0]