MCPcopy Create free account
hub / github.com/cpystan/SD-VLM / download_json

Function download_json

predict.py:54–60  ·  view source on GitHub ↗
(url: str, dest: Path)

Source from the content-addressed store, hash-verified

52]
53
54def download_json(url: str, dest: Path):
55 res = requests.get(url, allow_redirects=True)
56 if res.status_code == 200 and res.content:
57 with dest.open("wb") as f:
58 f.write(res.content)
59 else:
60 print(f"Failed to download {url}. Status code: {res.status_code}")
61
62def download_weights(baseurl: str, basedest: str, files: list[str]):
63 basedest = Path(basedest)

Callers 1

download_weightsFunction · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected