yetessam commited on
Commit
8ab9b9f
·
verified ·
1 Parent(s): 093f69c

Update tools/polite_guard.py

Browse files
Files changed (1) hide show
  1. tools/polite_guard.py +10 -10
tools/polite_guard.py CHANGED
@@ -4,20 +4,20 @@ from transformers import pipeline
4
 
5
 
6
  class PoliteGuardTool(Tool):
7
- """
8
- Takes the input text from users and then evaluates it against Polite Guard to return specific information
9
- about whether the content is polite.
10
-
11
- Args:
12
- input_text: Text that the user inputs into the agent and should then be evaluated.
13
-
14
- Returns:
15
- A classification label about whether the content is polite, somewhat polite, neutral or impolite.
16
 
 
 
 
 
 
 
17
  """
18
 
19
  name = "polite_guard"
20
- description = "Uses Polite guard to classify the user's input text by 4 labels from polite to impolite"
21
  inputs = {'input_text': {'type': 'any', 'description': 'Enter text for assessing whether it is respectful'}}
22
  output_type = "any"
23
 
 
4
 
5
 
6
  class PoliteGuardTool(Tool):
7
+ """
8
+ Takes the input text from users and then evaluates it against Polite Guard to return specific information
9
+ about whether the content is polite.
 
 
 
 
 
 
10
 
11
+ Args:
12
+ input_text: Text that the user inputs into the agent and should then be evaluated.
13
+
14
+ Returns:
15
+ A classification label about whether the content is polite, somewhat polite, neutral or impolite.
16
+
17
  """
18
 
19
  name = "polite_guard"
20
+ description = "Uses Polite guard to classify input text from polite to impolite"
21
  inputs = {'input_text': {'type': 'any', 'description': 'Enter text for assessing whether it is respectful'}}
22
  output_type = "any"
23