pixart sigma improvements

This commit is contained in:
Vladimir Mandic
2024-06-18 13:21:13 -04:00
parent 4122c6fbce
commit 2a27cd916d
10 changed files with 152 additions and 125 deletions
+1 -4
View File
@@ -45,10 +45,7 @@ if __name__ == "__main__":
log.info(f'api-json: {args}')
if os.path.isfile(args.json[0]):
with open(args.json[0], 'r', encoding='ascii') as f:
txt = f.read()
txt = txt.encode('ascii')
print('HERE', txt)
dct = json.loads(txt)
dct = json.load(f) # TODO fails with b64 encoded images inside json due to string encoding
else:
dct = json.loads(args.json[0])
res = post(endpoint=args.endpoint[0], payload=dct)