Spaces:
Sleeping
Sleeping
update
Browse files
main.py
CHANGED
@@ -38,13 +38,13 @@ def generate_image(prompt, model):
|
|
38 |
]
|
39 |
}
|
40 |
|
41 |
-
|
42 |
# with open("assertion.json", "w") as outfile:
|
43 |
# outfile.write(json_object)
|
44 |
|
45 |
subprocess.check_output(['./truepic-sign', 'init', 'file-system', '--api-key', os.environ.get("api_key")])
|
46 |
# subprocess.check_output(['./truepic-sign', 'sign', filename, '--assertions-file', 'assertion.json', '--output', (os.getcwd() + '/static/' + filename)])
|
47 |
-
subprocess.check_output(['./truepic-sign', 'sign', filename, '--assertions',
|
48 |
|
49 |
return {"response": filename}
|
50 |
|
|
|
38 |
]
|
39 |
}
|
40 |
|
41 |
+
json_object = json.dumps(assertion)
|
42 |
# with open("assertion.json", "w") as outfile:
|
43 |
# outfile.write(json_object)
|
44 |
|
45 |
subprocess.check_output(['./truepic-sign', 'init', 'file-system', '--api-key', os.environ.get("api_key")])
|
46 |
# subprocess.check_output(['./truepic-sign', 'sign', filename, '--assertions-file', 'assertion.json', '--output', (os.getcwd() + '/static/' + filename)])
|
47 |
+
subprocess.check_output(['./truepic-sign', 'sign', filename, '--assertions', json_object, '--output', (os.getcwd() + '/static/' + filename)])
|
48 |
|
49 |
return {"response": filename}
|
50 |
|