MCPcopy Create free account
hub / github.com/modelscope/modelscope / __init__

Method __init__

modelscope/hub/deploy.py:191–195  ·  view source on GitHub ↗
(self, endpoint=None, token: Optional[str] = None)

Source from the content-addressed store, hash-verified

189 """
190
191 def __init__(self, endpoint=None, token: Optional[str] = None):
192 self.endpoint = endpoint if endpoint is not None else get_endpoint()
193 self.headers = {'user-agent': ModelScopeConfig.get_user_agent()}
194 self.cookies = HubApi().get_cookies(
195 access_token=token, cookies_required=True)
196
197 # deploy_model
198 def create(self, model_id: str, revision: str, instance_name: str,

Callers

nothing calls this directly

Calls 4

get_endpointFunction · 0.90
HubApiClass · 0.90
get_user_agentMethod · 0.80
get_cookiesMethod · 0.80

Tested by

no test coverage detected