Use the push_to_hub function
You can also call push_to_hub directly on your model to upload it to the Hub.
Specify your model name in push_to_hub:

pt_model.push_to_hub("my-awesome-model")

This creates a repository under your username with the model name my-awesome-model. Users can now load your model with the from_pretrained function:

from transformers import AutoModel
model = AutoModel.from_pretrained("your_username/my-awesome-model")