Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -170,10 +170,10 @@ def compress_data(c,purpose, task, history, result):
|
|
170 |
def save_memory(purpose, history):
|
171 |
history=str(history)
|
172 |
c=0
|
173 |
-
|
174 |
-
rl = len(
|
175 |
print(f'rl:: {rl}')
|
176 |
-
for i in str(
|
177 |
if i == " " or i=="," or i=="\n" or i=="/" or i=="." or i=="<":
|
178 |
c +=1
|
179 |
print (f'c:: {c}')
|
@@ -189,7 +189,7 @@ def save_memory(purpose, history):
|
|
189 |
print(f'chunk:: {chunk}')
|
190 |
print(f'divr:: {divr}')
|
191 |
print (f'divi:: {divi}')
|
192 |
-
out = []
|
193 |
#out=""
|
194 |
s=0
|
195 |
e=chunk
|
@@ -199,7 +199,7 @@ def save_memory(purpose, history):
|
|
199 |
for z in range(divi):
|
200 |
print(f's:e :: {s}:{e}')
|
201 |
|
202 |
-
hist =
|
203 |
|
204 |
resp = run_gpt(
|
205 |
SAVE_MEMORY,
|
|
|
170 |
def save_memory(purpose, history):
|
171 |
history=str(history)
|
172 |
c=0
|
173 |
+
inp = str(history)
|
174 |
+
rl = len(inp)
|
175 |
print(f'rl:: {rl}')
|
176 |
+
for i in str(inp):
|
177 |
if i == " " or i=="," or i=="\n" or i=="/" or i=="." or i=="<":
|
178 |
c +=1
|
179 |
print (f'c:: {c}')
|
|
|
189 |
print(f'chunk:: {chunk}')
|
190 |
print(f'divr:: {divr}')
|
191 |
print (f'divi:: {divi}')
|
192 |
+
#out = []
|
193 |
#out=""
|
194 |
s=0
|
195 |
e=chunk
|
|
|
199 |
for z in range(divi):
|
200 |
print(f's:e :: {s}:{e}')
|
201 |
|
202 |
+
hist = inp[s:e]
|
203 |
|
204 |
resp = run_gpt(
|
205 |
SAVE_MEMORY,
|