cutiee82 commited on
Commit
d34aa96
·
verified ·
1 Parent(s): 380846a

Update client.py

Browse files
Files changed (1) hide show
  1. client.py +1 -1
client.py CHANGED
@@ -17,7 +17,7 @@ class Inference:
17
  response.raise_for_status()
18
  return response.content
19
  except requests.RequestException:
20
- if response.status_code in {429, 500, 502, 503, 504}:
21
  delay = min(2 ** retry, 60)
22
  time.sleep(delay)
23
  else:
 
17
  response.raise_for_status()
18
  return response.content
19
  except requests.RequestException:
20
+ if e.response.status_code in {429, 500, 502, 503, 504}:
21
  delay = min(2 ** retry, 60)
22
  time.sleep(delay)
23
  else: