From c09fc43d455715e4e6ac1835952a0cf926f12966 Mon Sep 17 00:00:00 2001 From: Vincent STRAGIER Date: Mon, 5 Jun 2023 12:27:18 +0200 Subject: [PATCH] Add some comments about the changes. --- deepface/DeepFace.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deepface/DeepFace.py b/deepface/DeepFace.py index a68bd01..a820741 100644 --- a/deepface/DeepFace.py +++ b/deepface/DeepFace.py @@ -297,10 +297,12 @@ def analyze( actions = (actions,) actions = list(actions) - + + # Check if actions have been passed correctly if not actions: raise ValueError("`actions` must be a list of strings.") + # For each action, check if it is valid for action in actions: if action not in ("emotion", "age", "gender", "race"): raise ValueError(