From da8583fac95c05355dc4f395b01a6e4b7d5a8446 Mon Sep 17 00:00:00 2001 From: numb3r3 Date: Tue, 30 Aug 2022 21:51:04 +0800 Subject: [PATCH] fix: use clip-auth-token env --- client/clip_client/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/clip_client/client.py b/client/clip_client/client.py index e844308b0..f7a0a736d 100644 --- a/client/clip_client/client.py +++ b/client/clip_client/client.py @@ -61,7 +61,9 @@ def __init__(self, server: str, credential: dict = {}, **kwargs): else: raise ValueError(f'{server} is not a valid scheme') - self._authorization = credential.get('Authorization', None) + self._authorization = credential.get( + 'Authorization', os.environ.get('CLIP_AUTH_TOKEN') + ) @overload def encode(