File size: 536 Bytes
a576d50
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from huggingface_hub import HfApi

# Initialize the API client
api = HfApi()

# Upload the model file to the Hugging Face Hub
api.upload_file(
    path_or_fileobj="models/05_going_modular_script_mode_tinyvgg_model.pth",  # Replace with the path to your model file
    path_in_repo="pytorch_model.bin",          # The name under which the file will be stored in the repo
    repo_id="ajitsi/tinyvgg",    # Replace with your username and repo name
    repo_type="model"                          # Specifies that it's a model repository
)