Update save.py

This commit is contained in:
Daniel Han-Chen 2024-02-20 04:35:07 +11:00
commit d9751e6553

View file

@ -842,7 +842,7 @@ def upload_to_huggingface(model, save_directory, token, method, extra = "", file
if "/" not in save_directory:
from huggingface_hub import whoami
try:
username = whoami()['name']
username = whoami(token = token)['name']
if type(old_username) is str and username != old_username:
username = old_username
pass