Zhu-FaceOnLive commited on
Commit
47fb55a
Β·
verified Β·
1 Parent(s): d2e0191

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -105,9 +105,10 @@ def process_response(response, soc_res, url, token):
105
  return []
106
 
107
  try:
108
- res = response.json().get('img_array')
109
  if soc_res:
110
  res = soc_res[0] + res + soc_res[1]
 
111
  suffix = "" if url == PREMIUM_URL else FREE_SUFFIX
112
  out_array = check_db(res, suffix)
113
 
 
105
  return []
106
 
107
  try:
108
+ res = response.json().get('img_array', []) if status_code == 202 else []
109
  if soc_res:
110
  res = soc_res[0] + res + soc_res[1]
111
+
112
  suffix = "" if url == PREMIUM_URL else FREE_SUFFIX
113
  out_array = check_db(res, suffix)
114