MCPcopy Create free account
hub / github.com/NVIDIA/FastPhotoStyle / save_response_content

Function save_response_content

download_models.py:25–31  ·  view source on GitHub ↗
(response, destination)

Source from the content-addressed store, hash-verified

23 return None
24
25def save_response_content(response, destination):
26 CHUNK_SIZE = 32768
27
28 with open(destination, "wb") as f:
29 for chunk in response.iter_content(CHUNK_SIZE):
30 if chunk: # filter out keep-alive new chunks
31 f.write(chunk)
32
33file_id = '1ENgQm9TgabE1R99zhNf5q6meBvX6WFuq'
34destination = './models.zip'

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected