esgenius-ai / export_utils.py
GirishaBuilds01's picture
Create export_utils.py
a295b90 verified
raw
history blame contribute delete
294 Bytes
import json
def export_json(answer, evidence, weights):
data = {
"answer": answer,
"evidence": evidence,
"mote_weights": weights
}
file_path = "esg_output.json"
with open(file_path, "w") as f:
json.dump(data, f, indent=4)
return file_path