Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,12 @@ def home():
|
|
26 |
|
27 |
# Simple content moderation function
|
28 |
def is_prompt_explicit(prompt):
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
for keyword in explicit_keywords:
|
31 |
if keyword.lower() in prompt.lower():
|
32 |
return True
|
|
|
26 |
|
27 |
# Simple content moderation function
|
28 |
def is_prompt_explicit(prompt):
|
29 |
+
# Streamlined keyword list to avoid unnecessary restrictions
|
30 |
+
explicit_keywords = [
|
31 |
+
"sexual", "porn", "hentai", "fetish", "nude", "provocative", "obscene", "vulgar", "intimate", "kinky", "hardcore",
|
32 |
+
"threesome", "orgy", "masturbation", "genital", "suicide",
|
33 |
+
"self-harm", "depression", "kill myself", "worthless"
|
34 |
+
]
|
35 |
for keyword in explicit_keywords:
|
36 |
if keyword.lower() in prompt.lower():
|
37 |
return True
|