Enable Semantic Search on Images

This commit is contained in:
Debanjum Singh Solanky
2021-08-22 21:00:54 -07:00
parent fd217fe8b7
commit 4daeddbbda
5 changed files with 104 additions and 28 deletions

View File

@@ -9,6 +9,10 @@ def get_absolute_path(filepath):
return str(pathlib.Path(filepath).expanduser().absolute())
def resolve_absolute_path(filepath, strict=False):
return pathlib.Path(filepath).expanduser().absolute().resolve(strict=strict)
def get_from_dict(dictionary, *args):
'''null-aware get from a nested dictionary
Returns: dictionary[args[0]][args[1]]... or None if any keys missing'''