# How to push extra files to Hugginface model hub?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-push-extra-files-to-hugginface-model-hub%2F26871%3E%5C
**Category:** 🤗Hub\
**Created:** [November 28, 2022, 3:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-push-extra-files-to-hugginface-model-hub%2F26871 "2022-11-28T15:38:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaditya](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/aaditya/32/20855_2.png) [@aaditya](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Faaditya)%5C
**Post date:** [November 28, 2022, 3:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-push-extra-files-to-hugginface-model-hub%2F26871%2F1 "2022-11-28T15:38:27Z")

</div>

Hi, I am using `model.push_to_hub(private=True)` but it’s not pushing training\_args and a few acc files. How can I include those files too?

---

<div class="post-metadata">

**Author:** ![mattupson](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mattupson/32/11942_2.png) [@mattupson](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmattupson)%5C
**Post date:** [November 28, 2022, 4:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-push-extra-files-to-hugginface-model-hub%2F26871%2F2 "2022-11-28T16:15:28Z")

</div>

Something like this should work

```auto
import os
from huggingface_hub import CommitOperationAdd, HfApi

hf_api = HfApi()

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

TOKEN = os.getenv("TOKEN")

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

```
