Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -648,19 +648,22 @@ def save_memory(purpose, history):
|
|
648 |
print(f'trying:: {line}')
|
649 |
keyw=line.split(":")[1]
|
650 |
print (keyw)
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
|
|
|
|
|
|
664 |
if "description" in line and ":" in line:
|
665 |
#print(f'trying:: {line}')
|
666 |
desc=line.split(":")[1]
|
@@ -723,7 +726,7 @@ def recall_memory(inp,history):
|
|
723 |
mem_keys = mem[0].keys()
|
724 |
rawp = get_mem(inp,mem_keys)
|
725 |
valid_list(rawp)
|
726 |
-
valid_list(["123","333"])
|
727 |
|
728 |
history.clear()
|
729 |
history.append((inp,rawp))
|
|
|
648 |
print(f'trying:: {line}')
|
649 |
keyw=line.split(":")[1]
|
650 |
print (keyw)
|
651 |
+
try:
|
652 |
+
print (keyw.split("[")[1].split("]")[0])
|
653 |
+
keyw=keyw.split("[")[1].split("]")[0]
|
654 |
+
for ea in keyw.split(","):
|
655 |
+
s1=""
|
656 |
+
ea=ea.strip().strip("\n")
|
657 |
+
for ev in ea:
|
658 |
+
if ev.isalnum():
|
659 |
+
s1+=ev
|
660 |
+
if ev == " ":
|
661 |
+
s1+=ev
|
662 |
+
#ea=s1
|
663 |
+
print(s1)
|
664 |
+
key_box.append(s1)
|
665 |
+
except Exception as e:
|
666 |
+
print(f'ERROR SAVING KEYWORD:: {e}')
|
667 |
if "description" in line and ":" in line:
|
668 |
#print(f'trying:: {line}')
|
669 |
desc=line.split(":")[1]
|
|
|
726 |
mem_keys = mem[0].keys()
|
727 |
rawp = get_mem(inp,mem_keys)
|
728 |
valid_list(rawp)
|
729 |
+
#valid_list(["123","333"])
|
730 |
|
731 |
history.clear()
|
732 |
history.append((inp,rawp))
|