increase tiny sleep time to handle server crashes on heavy load
Browse files69 unmodified lines707172737374757677787879808169 unmodified lines if value is not None and value != "": payload["input"][key] = value
time.sleep(0.8) time.sleep(1.0) response = requests.post("http://0.0.0.0:5000/predictions", headers=headers, json=payload) if response.status_code == 201: time.sleep(0.6) 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