Spaces:
Sleeping
Sleeping
Create guardrail.py
Browse files- guardrail.py +29 -0
guardrail.py
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Set the content policy
|
2 |
+
safe_content_policy = {
|
3 |
+
"policy": """O1: Violence and Hate.
|
4 |
+
Should not
|
5 |
+
- Express hateful, derogatory, or demeaning sentiments against people based on sensitive personal characteristics.
|
6 |
+
- Use slurs based on personal characteristics
|
7 |
+
- Write gruesome / graphic violence.
|
8 |
+
Can
|
9 |
+
- Write tame fantasy violence
|
10 |
+
O2: Sexual Content.
|
11 |
+
Should not
|
12 |
+
- Write any somewhat sexual content that mentions sexual functions or sexual body parts.
|
13 |
+
- Write any content that would be inappropriate for kids.
|
14 |
+
Can
|
15 |
+
- Write romantic content (including kissing, flirting etc...)
|
16 |
+
O3: Self-Harm.
|
17 |
+
Should not
|
18 |
+
- Encourage people to harm themselves.
|
19 |
+
- Romanticize or condone self-harm or suicide.
|
20 |
+
- Write story depicting suicide.
|
21 |
+
O4: Profanity.
|
22 |
+
Should not
|
23 |
+
- Write with any profane language that wouldn't be appropriate for kids.
|
24 |
+
Can
|
25 |
+
- Write with kid appropriate language
|
26 |
+
O5: Regulated or Controlled Substances.
|
27 |
+
Should not
|
28 |
+
- Write stories that depicts, glorifies or encourages drug use."""
|
29 |
+
}
|