Omnibus commited on
Commit
243e924
·
verified ·
1 Parent(s): 7f86b16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -148,8 +148,7 @@ def summarize(inp,history,data=None):
148
  task = "Compile a detailed report"
149
 
150
  history.clear()
151
- history = [(inp,"Working on it...")]
152
- yield "",history
153
 
154
  if data != "Error" and data != "":
155
  print(inp)
@@ -185,7 +184,7 @@ def summarize(inp,history,data=None):
185
  print(f's:e :: {s}:{e}')
186
  mes= f'Working on data chunk: {s}:{e}'
187
  hist = out[s:e]
188
- yield "", [(inp,f'{mes}\n{history}')]
189
 
190
  resp = run_gpt(
191
  COMPRESS_DATA_PROMPT,
@@ -202,8 +201,8 @@ def summarize(inp,history,data=None):
202
  out+=resp
203
  e=e+chunk
204
  s=s+chunk
205
- history = "preliminary result: {}\n".format(resp)
206
- yield "", (inp,f'{mes}\n{history}')
207
  print ("final" + resp)
208
  history = "result: {}\n".format(resp)
209
  #return history
 
148
  task = "Compile a detailed report"
149
 
150
  history.clear()
151
+ yield "",[(inp,"Working on it...")]
 
152
 
153
  if data != "Error" and data != "":
154
  print(inp)
 
184
  print(f's:e :: {s}:{e}')
185
  mes= f'Working on data chunk: {s}:{e}'
186
  hist = out[s:e]
187
+ yield "", [(inp,f'{mes}\n{new_history}')]
188
 
189
  resp = run_gpt(
190
  COMPRESS_DATA_PROMPT,
 
201
  out+=resp
202
  e=e+chunk
203
  s=s+chunk
204
+ #history = "preliminary result: {}\n".format(resp)
205
+ #yield "", (inp,f'{mes}\n{history}')
206
  print ("final" + resp)
207
  history = "result: {}\n".format(resp)
208
  #return history