Omnibus commited on
Commit
890838c
·
verified ·
1 Parent(s): 730432c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -122,7 +122,7 @@ def compress_data(c,purpose, task, history, result):
122
  print(f'chunk:: {chunk}')
123
  print(f'divr:: {divr}')
124
  print (f'divi:: {divi}')
125
- out = []
126
  #out=""
127
  s=0
128
  e=chunk
@@ -146,7 +146,7 @@ def compress_data(c,purpose, task, history, result):
146
  ).strip('\n')
147
  new_history = resp
148
  print (resp)
149
- out+=resp
150
  e=e+chunk
151
  s=s+chunk
152
  '''
@@ -162,9 +162,9 @@ def compress_data(c,purpose, task, history, result):
162
  )
163
  '''
164
  print ("final" + resp)
165
- history = resp
166
  #history = "result: {}\n".format(resp)
167
- return history
168
 
169
 
170
  def save_memory(purpose, history):
@@ -213,19 +213,20 @@ def save_memory(purpose, history):
213
  ).strip('\n')
214
  new_history = resp
215
  print (resp)
216
- out+=resp
217
  e=e+chunk
218
  s=s+chunk
219
  print ("final1" + resp)
220
 
221
- lines = resp.strip().strip("\n").split("\n")
222
- skills=[]
223
- skill_dict={}
224
- for i,line in enumerate(lines):
225
- print(f'Line:: {line}')
226
  #skills.append(resp)
227
- print ("final2" + resp)
228
  resp=eval(resp.split('</s>')[0])
 
229
 
230
  try:
231
  out=json.dumps(resp)
 
122
  print(f'chunk:: {chunk}')
123
  print(f'divr:: {divr}')
124
  print (f'divi:: {divi}')
125
+ #out = []
126
  #out=""
127
  s=0
128
  e=chunk
 
146
  ).strip('\n')
147
  new_history = resp
148
  print (resp)
149
+ #out+=resp
150
  e=e+chunk
151
  s=s+chunk
152
  '''
 
162
  )
163
  '''
164
  print ("final" + resp)
165
+ #history = resp
166
  #history = "result: {}\n".format(resp)
167
+ return resp
168
 
169
 
170
  def save_memory(purpose, history):
 
213
  ).strip('\n')
214
  new_history = resp
215
  print (resp)
216
+ #out+=resp
217
  e=e+chunk
218
  s=s+chunk
219
  print ("final1" + resp)
220
 
221
+ #lines = resp.strip().strip("\n").split("\n")
222
+ #skills=[]
223
+ #skill_dict={}
224
+ #for i,line in enumerate(lines):
225
+ # print(f'Line:: {line}')
226
  #skills.append(resp)
227
+ #print ("final2" + resp)
228
  resp=eval(resp.split('</s>')[0])
229
+ print ("final2" + resp)
230
 
231
  try:
232
  out=json.dumps(resp)