Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Upload models to huggingface platform #172

Open
nicolay-r opened this issue Dec 29, 2024 · 0 comments
Open

⬆️ Upload models to huggingface platform #172

nicolay-r opened this issue Dec 29, 2024 · 0 comments
Assignees

Comments

@nicolay-r
Copy link
Owner

nicolay-r commented Dec 29, 2024

from huggingface_hub import HfApi

# Initialize API
api = HfApi()

# Upload tar archive
api.upload_file(
    path_or_fileobj="my_model.tar",        # Path to the tar file
    path_in_repo="my_model.tar",           # Path in the repository
    repo_id="username/repository-name",    # Replace with your username/repo
    repo_type="model"                      # Specify repo type as 'model'
)
@nicolay-r nicolay-r self-assigned this Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant