increase tiny sleep time to handle server crashes on heavy load
Browse files69 unmodified lines70717273747576777879808169 unmodified linesif value is not None and value != "":payload["input"][key] = valuetime.sleep(0.8)response = requests.post("http://0.0.0.0:5000/predictions", headers=headers, json=payload)if response.status_code == 201:time.sleep(0.6)follow_up_url = response.json()["urls"]["get"]response = requests.get(follow_up_url, headers=headers)while response.json()["status"] != "succeeded":69 unmodified lines70717273747576777879808169 unmodified linesif value is not None and value != "":payload["input"][key] = valuetime.sleep(1.0)response = requests.post("http://0.0.0.0:5000/predictions", headers=headers, json=payload)if response.status_code == 201:time.sleep(1.0)follow_up_url = response.json()["urls"]["get"]response = requests.get(follow_up_url, headers=headers)while response.json()["status"] != "succeeded":
app.py+2-2