mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
Add some comments about the changes.
This commit is contained in:
parent
e643f56b75
commit
c09fc43d45
@ -297,10 +297,12 @@ def analyze(
|
|||||||
actions = (actions,)
|
actions = (actions,)
|
||||||
|
|
||||||
actions = list(actions)
|
actions = list(actions)
|
||||||
|
|
||||||
|
# Check if actions have been passed correctly
|
||||||
if not actions:
|
if not actions:
|
||||||
raise ValueError("`actions` must be a list of strings.")
|
raise ValueError("`actions` must be a list of strings.")
|
||||||
|
|
||||||
|
# For each action, check if it is valid
|
||||||
for action in actions:
|
for action in actions:
|
||||||
if action not in ("emotion", "age", "gender", "race"):
|
if action not in ("emotion", "age", "gender", "race"):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user