diff --git a/nsfw_detect.py b/nsfw_detect.py index 6bd9219..225d8a7 100755 --- a/nsfw_detect.py +++ b/nsfw_detect.py @@ -77,11 +77,11 @@ class NSFWDetector: "-cpng", "-i", fpath ], stdout=PIPE, stderr=DEVNULL, check=True) image_data = ff.stdout + + scores = self._compute(image_data) except: return -1.0 - scores = self._compute(image_data) - return scores[1]