The predict function call returns the resulting images as URL, and if I want to store them locally, I still have to fetch that. But a simple
urllib.request.urlretrieve(output[0], filename)
will fail with 403 because of lack of authentication; I have to include the authentication header in that request.
It would be convenient if the replicate library would assist with that, so that the user does not have to know how to include the token in the request.
The
predictfunction call returns the resulting images as URL, and if I want to store them locally, I still have to fetch that. But a simplewill fail with
403because of lack of authentication; I have to include the authentication header in that request.It would be convenient if the
replicatelibrary would assist with that, so that the user does not have to know how to include the token in the request.