Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,7 +114,7 @@ def _infer(input_image, prompt, seed=42, randomize_seed=False, guidance_scale=2.
|
|
| 114 |
# NSFW 检测
|
| 115 |
if nsfw_model and nsfw_processor:
|
| 116 |
if detect_nsfw(input_image):
|
| 117 |
-
msg = "
|
| 118 |
raise Exception(msg)
|
| 119 |
|
| 120 |
image = pipe(
|
|
@@ -138,7 +138,7 @@ def _infer(input_image, prompt, seed=42, randomize_seed=False, guidance_scale=2.
|
|
| 138 |
# NSFW 检测
|
| 139 |
if nsfw_model and nsfw_processor:
|
| 140 |
if detect_nsfw(image):
|
| 141 |
-
msg = "Generated image contains NSFW content and cannot be displayed. Please modify
|
| 142 |
raise Exception(msg)
|
| 143 |
|
| 144 |
progress(1, desc="Complete")
|
|
|
|
| 114 |
# NSFW 检测
|
| 115 |
if nsfw_model and nsfw_processor:
|
| 116 |
if detect_nsfw(input_image):
|
| 117 |
+
msg = "The input image contains NSFW content and cannot be generated. Please modify the input image or prompt and try again."
|
| 118 |
raise Exception(msg)
|
| 119 |
|
| 120 |
image = pipe(
|
|
|
|
| 138 |
# NSFW 检测
|
| 139 |
if nsfw_model and nsfw_processor:
|
| 140 |
if detect_nsfw(image):
|
| 141 |
+
msg = "Generated image contains NSFW content and cannot be displayed. Please modify the input image or prompt and try again."
|
| 142 |
raise Exception(msg)
|
| 143 |
|
| 144 |
progress(1, desc="Complete")
|