INNER CODE UNIT · Python
sendStatusAsync
kiri-art/docker-diffusers-api · api/app.py:195
async def sendStatusAsync():
await response.send(json.dumps(status.get()) + "\n")
def sendStatus():
try:
asyncio.run(sendStatusAsync())
Timer(1.0, sendStatus).start()
except:
pass
Timer(1.0, sendStatus).start()
if model_inputs == None or call_inputs == None:
return {
"$error": {
"code": "INVALID_INPUTS",
"message": "Expecting on object like { modelInputs: {}, callInputs: {} } but got "
+ json.dumps(all_inputs),