Save HFToken only if it is present

This commit is contained in:
Nicholas Koh 2023-01-19 14:41:41 +08:00 committed by Kent Keirsey
parent d9fa505412
commit a8bb1a1109

View File

@ -676,6 +676,7 @@ def download_weights(opt:dict) -> Union[str, None]:
return return
access_token = authenticate() access_token = authenticate()
if access_token is not None:
HfFolder.save_token(access_token) HfFolder.save_token(access_token)
print('\n** DOWNLOADING WEIGHTS **') print('\n** DOWNLOADING WEIGHTS **')