Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -265,9 +265,16 @@ def save_memory(purpose, history):
|
|
265 |
print (keyw.split("[")[1].split("]")[0])
|
266 |
keyw=keyw.split("[")[1].split("]")[0]
|
267 |
for ea in keyw.split(","):
|
|
|
268 |
ea=ea.strip().strip("\n")
|
269 |
-
|
270 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
lod.append({"file_name":timename,"keywords":key_box})
|
272 |
json_object = json.dumps(lod, indent=4)
|
273 |
with open(f"tmp2-{uid}.json", "w") as outfile2:
|
|
|
265 |
print (keyw.split("[")[1].split("]")[0])
|
266 |
keyw=keyw.split("[")[1].split("]")[0]
|
267 |
for ea in keyw.split(","):
|
268 |
+
s1=""
|
269 |
ea=ea.strip().strip("\n")
|
270 |
+
for ev in ea:
|
271 |
+
if ev.isalnum():
|
272 |
+
s1=s1.join(ev)
|
273 |
+
if ev == " ":
|
274 |
+
s1=s1.join(ev)
|
275 |
+
#ea=s1
|
276 |
+
print(s1)
|
277 |
+
key_box.append(s1)
|
278 |
lod.append({"file_name":timename,"keywords":key_box})
|
279 |
json_object = json.dumps(lod, indent=4)
|
280 |
with open(f"tmp2-{uid}.json", "w") as outfile2:
|