Omnibus commited on
Commit
e116759
·
verified ·
1 Parent(s): 71e00a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- out = str(history)
174
- rl = len(out)
175
  print(f'rl:: {rl}')
176
- for i in str(out):
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 = out[s:e]
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,