(
self,
*,
path_or_fileobj: Union[str, Path, bytes, BinaryIO],
path_in_repo: str,
repo_id: str,
token: Union[str, bool, None] = None,
revision: Optional[str] = DEFAULT_REPOSITORY_REVISION,
commit_message: Optional[str] = None,
commit_description: Optional[str] = None,
**kwargs,
)
| 800 | |
| 801 | @future_compatible |
| 802 | def upload_file( |
| 803 | self, |
| 804 | *, |
| 805 | path_or_fileobj: Union[str, Path, bytes, BinaryIO], |
| 806 | path_in_repo: str, |
| 807 | repo_id: str, |
| 808 | token: Union[str, bool, None] = None, |
| 809 | revision: Optional[str] = DEFAULT_REPOSITORY_REVISION, |
| 810 | commit_message: Optional[str] = None, |
| 811 | commit_description: Optional[str] = None, |
| 812 | **kwargs, |
| 813 | ): |
| 814 | if revision is None or revision == 'main': |
| 815 | revision = 'master' |
| 816 | from modelscope.hub.push_to_hub import _push_files_to_hub |
| 817 | _push_files_to_hub(path_or_fileobj, path_in_repo, repo_id, token, |
| 818 | revision, commit_message, commit_description) |
| 819 | |
| 820 | @future_compatible |
| 821 | def create_commit( |
searching dependent graphs…