Charbel Malo commited on
Commit
8648922
β€’
1 Parent(s): 9641cdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -250,14 +250,14 @@ def process(
250
  def swap_process(image_sequence):
251
  ## ------------------------------ CONTENT CHECK ------------------------------
252
 
253
- # yield "### \n βŒ› Checking contents...", *ui_before()
254
- # nsfw = NSFW_DETECTOR.is_nsfw(image_sequence)
255
- # if nsfw:
256
- # message = "NSFW Content detected !!!"
257
- # yield f"### \n πŸ”ž {message}", *ui_before()
258
- # assert not nsfw, message
259
- # return False
260
- # EMPTY_CACHE()
261
 
262
  ## ------------------------------ ANALYSE FACE ------------------------------
263
 
 
250
  def swap_process(image_sequence):
251
  ## ------------------------------ CONTENT CHECK ------------------------------
252
 
253
+ yield "### \n βŒ› Checking contents...", *ui_before()
254
+ nsfw = NSFW_DETECTOR.is_nsfw(image_sequence)
255
+ if nsfw:
256
+ message = "NSFW Content detected !!!"
257
+ yield f"### \n πŸ”ž {message}", *ui_before()
258
+ assert not nsfw, message
259
+ return False
260
+ EMPTY_CACHE()
261
 
262
  ## ------------------------------ ANALYSE FACE ------------------------------
263