Omnibus commited on
Commit
276037b
·
verified ·
1 Parent(s): 85d6b23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -384,10 +384,10 @@ Required keys:
384
  def format_json(inp):
385
  new_json=[]
386
  print("FORMATTING:::")
387
- for i,line in enumerate(inp.split("\n")):
388
  line = line.strip()
389
  #print(line)
390
- if line.startswith(("keywords","title","description","content","url","{","}"),0,20):
391
  print (line)
392
 
393
  '''
@@ -458,7 +458,6 @@ def save_memory(purpose, history):
458
  task=task,
459
  history=hist,
460
  ).strip('\n')
461
- format_json(resp)
462
  #new_history = resp
463
  #print (resp)
464
  #out+=resp
@@ -489,6 +488,8 @@ def save_memory(purpose, history):
489
  repo_type="dataset",
490
  )
491
  lines = resp.strip().strip("\n").split("\n")
 
 
492
  r = requests.get(f'{save_data}mem-test2/main.json')
493
  print(f'status code main:: {r.status_code}')
494
  try:
 
384
  def format_json(inp):
385
  new_json=[]
386
  print("FORMATTING:::")
387
+ for i,line in enumerate(inp):
388
  line = line.strip()
389
  #print(line)
390
+ if line.startswith(("keywords","title","description","content","url","{","}")):
391
  print (line)
392
 
393
  '''
 
458
  task=task,
459
  history=hist,
460
  ).strip('\n')
 
461
  #new_history = resp
462
  #print (resp)
463
  #out+=resp
 
488
  repo_type="dataset",
489
  )
490
  lines = resp.strip().strip("\n").split("\n")
491
+ format_json(lines)
492
+
493
  r = requests.get(f'{save_data}mem-test2/main.json')
494
  print(f'status code main:: {r.status_code}')
495
  try: