Spaces:
Sleeping
Sleeping
Update tools/polite_guard.py
Browse files- 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]
|