How to push extra files to Hugginface model hub?
Hi, I am usingmodel.push_to_hub(private=True)but it’s not pushing training_args and a few acc files. How can I include those files too?
2022-11-28T16:15:28Z
Something like this should workimport os
from huggingface_hub import CommitOperationAdd, HfApi

REDACTED_TOKEN = HfApi()

operations = [CommitOperationAdd(path_in_repo="pytorch_model.bin", path_or_fileobj="models/pytorch_model.bin")]

TOKEN = os.getenv("TOKEN")

commit = REDACTED_TOKEN.create_commit(
            repo_id="my_repo",
            operations=operations,
            commit_message="Upload files...",
            token=TOKEN,
            revision="main",
)