# Save model to private by default via push\_to\_hub()

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsave-model-to-private-by-default-via-push-to-hub%2F27954%3E%5C
**Category:** 🤗Hub\
**Created:** [December 16, 2022, 5:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsave-model-to-private-by-default-via-push-to-hub%2F27954 "2022-12-16T17:00:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StefanSamba](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@StefanSamba](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FStefanSamba)%5C
**Post date:** [December 16, 2022, 5:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsave-model-to-private-by-default-via-push-to-hub%2F27954%2F1 "2022-12-16T17:00:03Z")

</div>

Hi Team,

I noticed that when using the .`push_to_hub()` method via a notebook, the model will be pushed to the HF Model Hub and set to public.

After logging in you can set your models to private manually by using the UI. I was wondering if there is an option to:

- set all uploaded models to private by default
- add an argument to the push\_to\_hub function to make it private

Thanks & keep up the good work!

---

<div class="post-metadata">

**Author:** ![stevhliu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/stevhliu/32/18373_2.png) [@stevhliu](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fstevhliu)%5C
**Post date:** [December 16, 2022, 7:23pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsave-model-to-private-by-default-via-push-to-hub%2F27954%2F2 "2022-12-16T19:23:16Z")

</div>

Hi!

In `TrainingArguments`, you can set the [`hub_private_repo`](https://huggingface.co/docs/transformers/main_classes/trainer#transformers.TrainingArguments.hub_private_repo) parameter to `True` to push your model privately to the Hub.

---

<div class="post-metadata">

**Author:** ![StefanSamba](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@StefanSamba](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FStefanSamba)%5C
**Post date:** [January 6, 2023, 2:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsave-model-to-private-by-default-via-push-to-hub%2F27954%2F3 "2023-01-06T14:54:00Z")

</div>

Thanks, yep… That’s what I needed.
