Upload utils.py with huggingface_hub
Browse files123422 unmodified lines272829303132import jsonfrom typing import Any, Dictimport pkg_resources22 unmodified linesreturn dict(items)def load_json(path):with open(path) as f:try:1234522 unmodified lines2829303132333435363738import jsonfrom functools import lru_cachefrom typing import Any, Dictimport pkg_resources22 unmodified linesreturn dict(items)@lru_cache(maxsize=None)def artifacts_json_cache(artifact_path):return load_json(artifact_path)def load_json(path):with open(path) as f:try:
utils.py+6