Omnibus commited on
Commit
f1490ca
1 Parent(s): 29d3606

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -530,7 +530,7 @@ def save_memory(purpose, history):
530
  lod = []
531
  for i,line in enumerate(lines):
532
  key_box=[]
533
- print(f'LINE:: {line}')
534
  if ":" in line:
535
  print(f'line:: {line}')
536
 
@@ -551,7 +551,11 @@ def save_memory(purpose, history):
551
  #ea=s1
552
  print(s1)
553
  key_box.append(s1)
554
- lod.append({"file_name":f"{timename}---{s}-{ee}","keywords":key_box,"index":f"{s}:{ee}"})
 
 
 
 
555
  json_object = json.dumps(lod, indent=4)
556
  with open(f"tmp2-{uid}.json", "w") as outfile2:
557
  outfile2.write(json_object)
 
530
  lod = []
531
  for i,line in enumerate(lines):
532
  key_box=[]
533
+ #print(f'LINE:: {line}')
534
  if ":" in line:
535
  print(f'line:: {line}')
536
 
 
551
  #ea=s1
552
  print(s1)
553
  key_box.append(s1)
554
+ if "description" in line and ":" in line:
555
+ #print(f'trying:: {line}')
556
+ desc=line.split(":")[1]
557
+
558
+ lod.append({"file_name":f"{timename}---{s}-{ee}","keywords":key_box,"description":str(desc),"index":f"{s}:{ee}"})
559
  json_object = json.dumps(lod, indent=4)
560
  with open(f"tmp2-{uid}.json", "w") as outfile2:
561
  outfile2.write(json_object)