Browse Source

fix format

master
jiangyu.xzy 2 years ago
parent
commit
5f3c9433fc
2 changed files with 1 additions and 2 deletions
  1. +0
    -1
      modelscope/hub/api.py
  2. +1
    -1
      modelscope/hub/utils/utils.py

+ 0
- 1
modelscope/hub/api.py View File

@@ -647,7 +647,6 @@ class HubApi:
return self._check_cookie(use_cookies=use_cookies)



class ModelScopeConfig:
path_credential = expanduser(DEFAULT_CREDENTIALS_PATH)
COOKIES_FILE_NAME = 'cookies'


+ 1
- 1
modelscope/hub/utils/utils.py View File

@@ -95,7 +95,7 @@ def create_library_statistics(method: str,
try:
path = f'{get_endpoint()}/api/v1/statistics/library'
headers = {'user-agent': ModelScopeConfig.get_user_agent()}
params = {"Method": method, "Name": name, "CnName": cn_name}
params = {'Method': method, 'Name': name, 'CnName': cn_name}
r = requests.post(path, params=params, headers=headers)
r.raise_for_status()
except Exception:


Loading…
Cancel
Save