Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -404,14 +404,14 @@ def save_memory(purpose, history):
|
|
404 |
out_box = []
|
405 |
#out=""
|
406 |
s=0
|
407 |
-
|
408 |
-
print(f'e:: {
|
409 |
new_history=""
|
410 |
task = f'Index this Data\n'
|
411 |
for z in range(divi):
|
412 |
-
print(f's:e :: {s}:{
|
413 |
|
414 |
-
hist = inp[s:
|
415 |
|
416 |
resp = run_gpt(
|
417 |
SAVE_MEMORY,
|
@@ -483,7 +483,7 @@ def save_memory(purpose, history):
|
|
483 |
#ea=s1
|
484 |
print(s1)
|
485 |
key_box.append(s1)
|
486 |
-
lod.append({"file_name":f"{timename}---{s}-{
|
487 |
json_object = json.dumps(lod, indent=4)
|
488 |
with open(f"tmp2-{uid}.json", "w") as outfile2:
|
489 |
outfile2.write(json_object)
|
|
|
404 |
out_box = []
|
405 |
#out=""
|
406 |
s=0
|
407 |
+
ee=chunk
|
408 |
+
print(f'e:: {ee}')
|
409 |
new_history=""
|
410 |
task = f'Index this Data\n'
|
411 |
for z in range(divi):
|
412 |
+
print(f's:e :: {s}:{ee}')
|
413 |
|
414 |
+
hist = inp[s:ee]
|
415 |
|
416 |
resp = run_gpt(
|
417 |
SAVE_MEMORY,
|
|
|
483 |
#ea=s1
|
484 |
print(s1)
|
485 |
key_box.append(s1)
|
486 |
+
lod.append({"file_name":f"{timename}---{s}-{ee}","keywords":key_box,"index":f"{s}:{ee}"})
|
487 |
json_object = json.dumps(lod, indent=4)
|
488 |
with open(f"tmp2-{uid}.json", "w") as outfile2:
|
489 |
outfile2.write(json_object)
|