Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -265,8 +265,9 @@ def save_memory(purpose, history):
|
|
265 |
keyw=keyw.split("[")[1].split("]")[0]
|
266 |
print(keyw)
|
267 |
lod.append({"file_name":timename,"keywords":keyw})
|
|
|
268 |
with open(f"tmp2-{uid}.json", "w") as outfile2:
|
269 |
-
outfile2.write(
|
270 |
api.upload_file(
|
271 |
path_or_fileobj=f"tmp2-{uid}.json",
|
272 |
path_in_repo=f"/mem-test/main.json",
|
|
|
265 |
keyw=keyw.split("[")[1].split("]")[0]
|
266 |
print(keyw)
|
267 |
lod.append({"file_name":timename,"keywords":keyw})
|
268 |
+
json_object = json.dumps(lod, indent=4)
|
269 |
with open(f"tmp2-{uid}.json", "w") as outfile2:
|
270 |
+
outfile2.write(json_object)
|
271 |
api.upload_file(
|
272 |
path_or_fileobj=f"tmp2-{uid}.json",
|
273 |
path_in_repo=f"/mem-test/main.json",
|