mirror of
https://github.com/modelscope/modelscope.git
synced 2026-09-01 19:49:03 +02:00
fix test
This commit is contained in:
@@ -718,10 +718,12 @@ class HubApi:
|
||||
def get_valid_revision(self,
|
||||
model_id: str,
|
||||
revision=None,
|
||||
cookies: Optional[CookieJar] = None):
|
||||
cookies: Optional[CookieJar] = None,
|
||||
endpoint: Optional[str] = None):
|
||||
return self.get_valid_revision_detail(model_id=model_id,
|
||||
revision=revision,
|
||||
cookies=cookies)['Revision']
|
||||
cookies=cookies,
|
||||
endpoint=endpoint)['Revision']
|
||||
|
||||
def get_model_branches_and_tags_details(
|
||||
self,
|
||||
|
||||
@@ -359,8 +359,10 @@ def create_temporary_directory_and_cache(model_id: str,
|
||||
return temporary_cache_dir, cache
|
||||
|
||||
|
||||
def get_file_download_url(model_id: str, file_path: str, revision: str,
|
||||
endpoint: str):
|
||||
def get_file_download_url(model_id: str,
|
||||
file_path: str,
|
||||
revision: str,
|
||||
endpoint: Optional[str] = None):
|
||||
"""Format file download url according to `model_id`, `revision` and `file_path`.
|
||||
e.g., Given `model_id=john/bert`, `revision=master`, `file_path=README.md`,
|
||||
the resulted download url is: https://modelscope.cn/api/v1/models/john/bert/repo?Revision=master&FilePath=README.md
|
||||
|
||||
Reference in New Issue
Block a user