frogleo commited on
Commit
3421bda
·
verified ·
1 Parent(s): 31d44d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = "Generated image contains NSFW content and cannot be displayed. Please modify your prompt and try again."
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 your prompt and try again."
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")