case handling analyze function with single actions

This commit is contained in:
Yiğit Ö. Ünver 2022-12-11 21:49:02 +03:00 committed by GitHub
parent 13a21fe306
commit 4e3631c579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,6 +321,9 @@ def analyze(img_path, actions = ('emotion', 'age', 'gender', 'race') , models =
}
"""
if type(actions) == str:
actions = (actions,)
actions = list(actions)
if not models: