Update codes following the comments of @sourcery-ai.
Signed-off-by: Vic P <vic4key@gmail.com>pull/421/head
parent
7313a332c8
commit
6d28a52869
|
@ -160,7 +160,7 @@ options:
|
|||
--keep-audio keep original audio
|
||||
--keep-frames keep temporary frames
|
||||
--many-faces process every face
|
||||
--nsfw-filter filter the NSFW image or video.
|
||||
--nsfw-filter filter the NSFW image or video
|
||||
--video-encoder {libx264,libx265,libvpx-vp9} adjust output video encoder
|
||||
--video-quality [0-51] adjust output video quality
|
||||
--max-memory MAX_MEMORY maximum amount of RAM in GB
|
||||
|
|
|
@ -6,6 +6,7 @@ from modules.typing import Frame
|
|||
|
||||
MAX_PROBABILITY = 0.85
|
||||
|
||||
# Preload the model once for efficiency
|
||||
model = None
|
||||
|
||||
def predict_frame(target_frame: Frame) -> bool:
|
||||
|
|
|
@ -193,7 +193,7 @@ def select_output_path(start: Callable[[], None]) -> None:
|
|||
|
||||
|
||||
def check_and_ignore_nsfw(target, destroy: Callable = None) -> bool:
|
||||
''' Check the target is NSFW or not.
|
||||
''' Check if the target is NSFW.
|
||||
TODO: Consider to make blur the target.
|
||||
'''
|
||||
from numpy import ndarray
|
||||
|
|
Loading…
Reference in New Issue