VayomerAdonai commited on
Commit
45a2432
·
verified ·
1 Parent(s): 30c2304

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -432,13 +432,13 @@ def generate(
432
  )
433
 
434
  safety_checker_input = pipe.safety_feature_extractor([image], return_tensors="pt").pixel_values.cuda()
435
- _, has_nsfw_concept = pipe.safety_checker(
436
  images=[torch.zeros(1)], clip_input=safety_checker_input
437
  )
438
  has_nsfw_concept = has_nsfw_concept[0]
439
 
440
  if has_nsfw_concept:
441
- image = Image.open("nsfw.png")
442
 
443
  if gallery_images is None:
444
  gallery_images = []
 
432
  )
433
 
434
  safety_checker_input = pipe.safety_feature_extractor([image], return_tensors="pt").pixel_values.cuda()
435
+ _, has_nsfw_concept = pipe.safety_checker = none
436
  images=[torch.zeros(1)], clip_input=safety_checker_input
437
  )
438
  has_nsfw_concept = has_nsfw_concept[0]
439
 
440
  if has_nsfw_concept:
441
+ image = Image.open()
442
 
443
  if gallery_images is None:
444
  gallery_images = []