Update codes following the comments of @sourcery-ai.

Signed-off-by: Vic P <vic4key@gmail.com>
pull/421/head
Vic P 2024-08-21 02:14:37 +07:00
parent 7313a332c8
commit 6d28a52869
3 changed files with 3 additions and 2 deletions

View File

@ -160,7 +160,7 @@ options:
--keep-audio keep original audio --keep-audio keep original audio
--keep-frames keep temporary frames --keep-frames keep temporary frames
--many-faces process every face --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-encoder {libx264,libx265,libvpx-vp9} adjust output video encoder
--video-quality [0-51] adjust output video quality --video-quality [0-51] adjust output video quality
--max-memory MAX_MEMORY maximum amount of RAM in GB --max-memory MAX_MEMORY maximum amount of RAM in GB

View File

@ -6,6 +6,7 @@ from modules.typing import Frame
MAX_PROBABILITY = 0.85 MAX_PROBABILITY = 0.85
# Preload the model once for efficiency
model = None model = None
def predict_frame(target_frame: Frame) -> bool: def predict_frame(target_frame: Frame) -> bool:

View File

@ -193,7 +193,7 @@ def select_output_path(start: Callable[[], None]) -> None:
def check_and_ignore_nsfw(target, destroy: Callable = None) -> bool: 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. TODO: Consider to make blur the target.
''' '''
from numpy import ndarray from numpy import ndarray