# Upload a custom model from existing github repo

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fupload-a-custom-model-from-existing-github-repo%2F105773%3E%5C
**Category:** Beginners\
**Created:** [September 7, 2024, 12:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fupload-a-custom-model-from-existing-github-repo%2F105773 "2024-09-07T12:09:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mese79](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@mese79](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmese79)%5C
**Post date:** [September 7, 2024, 12:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fupload-a-custom-model-from-existing-github-repo%2F105773%2F1 "2024-09-07T12:09:56Z")

</div>

Hi 🤗  
I have a custom pytorch model on a github repo, I wonder how can I upload/link this model/repo into a hugging-face model repo?  
Do I have to create a repo on hugging-face as well and manually sync both repos everytime I make a commit to the github repo?  
Is there any tutorial?

I’m aware of the `PyTorchModelHubMixin` class, but this is for the model compatibility level. I want to update my github’s repo and have everything synced on the hugging-face repo.

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnielsr)%5C
**Post date:** [September 9, 2024, 7:29am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fupload-a-custom-model-from-existing-github-repo%2F105773%2F2 "2024-09-09T07:29:04Z")

</div>

Hi,

This can be achieved using Webhooks: [Webhooks](https://huggingface.co/docs/hub/en/webhooks). It allows you to automatically train a HF model for instance whenever a HF dataset gets uploaded.
