tinyvgg / upload_model.py
ajitsi's picture
upload model
a576d50
raw
history blame contribute delete
536 Bytes
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
)