diff --git a/modelscope/hub/api.py b/modelscope/hub/api.py index 224c55ff..7468e5e3 100644 --- a/modelscope/hub/api.py +++ b/modelscope/hub/api.py @@ -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' diff --git a/modelscope/hub/utils/utils.py b/modelscope/hub/utils/utils.py index 5c915998..312647c2 100644 --- a/modelscope/hub/utils/utils.py +++ b/modelscope/hub/utils/utils.py @@ -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: