Browse Source

fix import bug

master
jiangyu.xzy 3 years ago
parent
commit
f2faf3acb3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modelscope/hub/utils/utils.py

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

@@ -7,7 +7,6 @@ from typing import Optional


import requests import requests


from modelscope.hub.api import ModelScopeConfig
from modelscope.hub.constants import (DEFAULT_MODELSCOPE_DOMAIN, from modelscope.hub.constants import (DEFAULT_MODELSCOPE_DOMAIN,
DEFAULT_MODELSCOPE_GROUP, DEFAULT_MODELSCOPE_GROUP,
MODEL_ID_SEPARATOR, MODELSCOPE_SDK_DEBUG, MODEL_ID_SEPARATOR, MODELSCOPE_SDK_DEBUG,
@@ -92,6 +91,7 @@ def file_integrity_validation(file_path, expected_sha256):


def create_library_statistics(method: str, name: str, cn_name: Optional[str]): def create_library_statistics(method: str, name: str, cn_name: Optional[str]):
try: try:
from modelscope.hub.api import ModelScopeConfig
path = f'{get_endpoint()}/api/v1/statistics/library' path = f'{get_endpoint()}/api/v1/statistics/library'
headers = {'user-agent': ModelScopeConfig.get_user_agent()} headers = {'user-agent': ModelScopeConfig.get_user_agent()}
params = {'Method': method, 'Name': name, 'CnName': cn_name} params = {'Method': method, 'Name': name, 'CnName': cn_name}


Loading…
Cancel
Save