Module: sarpyx.utils.up
File: sarpyx/utils/up.py
Script to upload models/datasets to Hugging Face Hub
Exported Symbols (__all__)
No explicit __all__ list. Public symbols inferred from implementation.
Public Functions (2)
upload_to_hf function
Upload files or folder to Hugging Face Hub
File location: sarpyx/utils/up.py:12
Signature
upload_to_hf(local_path: str, repo_id: str, repo_type: str='model', token: str=None, commit_message: str='Upload files')
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
local_path | str | yes | - | Path to local file or folder |
repo_id | str | yes | - | Repository ID (username/repo-name) |
repo_type | str | no | 'model' | Type of repo ("model", "dataset", or "space") |
token | str | no | None | HF token (if not provided, will use cached token) |
commit_message | str | no | 'Upload files' | Commit message |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- io
Example Usage
from sarpyx.utils.up import upload_to_hf
result = upload_to_hf(local_path=<local_path>, repo_id=<repo_id>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
main function
inferred from implementation.
File location: sarpyx/utils/up.py:60
Signature
main()
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
- | - | no | - | No explicit public parameters; behavior inferred from implementation. |
Return Type
inferred from implementation
inferred from implementation.
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- io
Example Usage
from sarpyx.utils.up import main
result = main()
Edge Cases
No explicit edge-case section found; behavior is inferred from implementation.
Public Classes (0)
No public classes detected.