fixed broken json saving
This commit is contained in:
parent
815afe2e5f
commit
ecc8b170b4
@ -230,14 +230,16 @@ for line in dialog:
|
|||||||
# next_file = "0.json"
|
# next_file = "0.json"
|
||||||
#else:
|
#else:
|
||||||
# next_file = str(max([int(f[:-5]) for f in files]) + 1) + ".json"
|
# next_file = str(max([int(f[:-5]) for f in files]) + 1) + ".json"
|
||||||
#
|
|
||||||
#
|
|
||||||
## save to output_dialogs/next_file
|
|
||||||
#with open(root + "/output_dialogs/" + next_file, "w", encoding="utf-8") as f:
|
|
||||||
# json.dump(training_dict, f, indent=4, ensure_ascii=False)
|
|
||||||
|
|
||||||
next_file = datetime.now().strftime("%d-%m-%Y_%H-%M-%S") + ".json"
|
next_file = datetime.now().strftime("%d-%m-%Y_%H-%M-%S") + ".json"
|
||||||
|
|
||||||
|
# save to output_dialogs/next_file
|
||||||
|
with open(root + "/output_dialogs/" + next_file, "w", encoding="utf-8") as f:
|
||||||
|
json.dump(training_dict, f, indent=4, ensure_ascii=False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user