jclyo1 commited on
Commit
0ee138d
1 Parent(s): 5973045
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -38,13 +38,13 @@ def generate_image(prompt, model):
38
  ]
39
  }
40
 
41
- # json_object = json.dumps(assertion, indent=4)
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', assertion, '--output', (os.getcwd() + '/static/' + filename)])
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