Charbel Malo
commited on
Commit
β’
8648922
1
Parent(s):
9641cdc
Update app.py
Browse files
app.py
CHANGED
@@ -250,14 +250,14 @@ def process(
|
|
250 |
def swap_process(image_sequence):
|
251 |
## ------------------------------ CONTENT CHECK ------------------------------
|
252 |
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
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 |
|