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

Method read

modelscope/fileio/file.py:127–131  ·  view source on GitHub ↗
(self, url)

Source from the content-addressed store, hash-verified

125 """HTTP and HTTPS storage."""
126
127 def read(self, url):
128 # TODO @wenmeng.zwm add progress bar if file is too large
129 r = requests.get(url)
130 r.raise_for_status()
131 return r.content
132
133 def read_text(self, url):
134 r = requests.get(url)

Callers 7

load_bytes_from_urlFunction · 0.95
generate_scp_from_urlFunction · 0.95
generate_text_from_urlFunction · 0.95
generate_scp_for_svFunction · 0.95
generate_sd_scp_from_urlFunction · 0.95
as_local_pathMethod · 0.95
test_http_storageMethod · 0.95

Calls 1

getMethod · 0.45

Tested by 1

test_http_storageMethod · 0.76