Created
October 2, 2022 20:19
-
-
Save ahmedbesbes/1f438f000f6b7dfceb6a2eb14ccf4309 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def load_model(filename: str, cache_folder: Union[str, Path]): | |
if isinstance(cache_folder, Path): | |
cache_folder = str(cache_folder) | |
model_path = os.join(filename, cache_folder) | |
model = torch.load(model_path) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment