Spaces:
Runtime error
Runtime error
cocktailpeanut
commited on
Commit
•
60d647a
1
Parent(s):
ce4b9eb
update
Browse files
app.py
CHANGED
@@ -80,12 +80,12 @@ def generate_image(
|
|
80 |
prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale
|
81 |
)
|
82 |
|
83 |
-
if SAFETY_CHECKER:
|
84 |
-
images, has_nsfw_concepts = check_nsfw_images(results.images)
|
85 |
-
if any(has_nsfw_concepts):
|
86 |
-
gr.Warning("NSFW content detected.")
|
87 |
-
return Image.new("RGB", (512, 512))
|
88 |
-
return images[0]
|
89 |
return results.images[0]
|
90 |
|
91 |
|
|
|
80 |
prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale
|
81 |
)
|
82 |
|
83 |
+
# if SAFETY_CHECKER:
|
84 |
+
# images, has_nsfw_concepts = check_nsfw_images(results.images)
|
85 |
+
# if any(has_nsfw_concepts):
|
86 |
+
# gr.Warning("NSFW content detected.")
|
87 |
+
# return Image.new("RGB", (512, 512))
|
88 |
+
# return images[0]
|
89 |
return results.images[0]
|
90 |
|
91 |
|