Spaces:
Runtime error
Runtime error
Update app.py
Browse files70 unmodified lines717273747576774 unmodified lines82838485868770 unmodified linespayload["input"][key] = valueresponse = requests.post("http://0.0.0.0:5000/predictions", headers=headers, json=payload)if response.status_code == 201:follow_up_url = response.json()["urls"]["get"]4 unmodified linesresponse = requests.get(follow_up_url, headers=headers)time.sleep(1)if response.status_code == 200:json_response = response.json()#If the output component is JSON return the entire output responseif(outputs[0].get_config()["name"] == "json"):70 unmodified lines717273747576774 unmodified lines8283848586878870 unmodified linespayload["input"][key] = valueresponse = requests.post("http://0.0.0.0:5000/predictions", headers=headers, json=payload)time.sleep(1)if response.status_code == 201:follow_up_url = response.json()["urls"]["get"]4 unmodified linesresponse = requests.get(follow_up_url, headers=headers)time.sleep(1)if response.status_code == 200:json_response = response.json()#If the output component is JSON return the entire output responseif(outputs[0].get_config()["name"] == "json"):
app.py+2-1