Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,10 @@ no_nsfw_image_path = "no_nsfw.png"
|
|
14 |
|
15 |
# I have to add this due to OpenAI policy, which prohibits any of this content... wonder why. suckers; you can host this locally if u wanna be weird
|
16 |
def is_nsfw(text):
|
17 |
-
|
|
|
|
|
|
|
18 |
|
19 |
def generate_image(prompt, model):
|
20 |
if is_nsfw(prompt):
|
|
|
14 |
|
15 |
# I have to add this due to OpenAI policy, which prohibits any of this content... wonder why. suckers; you can host this locally if u wanna be weird
|
16 |
def is_nsfw(text):
|
17 |
+
result = profanity.contains_profanity(text)
|
18 |
+
print(f"NSFW Check for prompt '{text}': {result}")
|
19 |
+
return result
|
20 |
+
|
21 |
|
22 |
def generate_image(prompt, model):
|
23 |
if is_nsfw(prompt):
|