Ali2206 commited on
Commit
6dea94e
·
verified ·
1 Parent(s): e41225f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -198,10 +198,11 @@ async def process_file(agent: TxAgent, file_path: str) -> Generator[Tuple[List[D
198
  with ThreadPoolExecutor(max_workers=MAX_CONCURRENT) as executor:
199
  futures = []
200
  for idx, chunk in enumerate(chunks):
201
- futures.append(executor.submit(
202
  lambda c, i: asyncio.run(process_chunk(agent, c, i)),
203
  chunk, idx
204
  )
 
205
  messages.append({"role": "assistant", "content": f"🔍 Processing chunk {idx+1}/{len(chunks)}..."})
206
  yield messages, None
207
 
 
198
  with ThreadPoolExecutor(max_workers=MAX_CONCURRENT) as executor:
199
  futures = []
200
  for idx, chunk in enumerate(chunks):
201
+ future = executor.submit(
202
  lambda c, i: asyncio.run(process_chunk(agent, c, i)),
203
  chunk, idx
204
  )
205
+ futures.append(future)
206
  messages.append({"role": "assistant", "content": f"🔍 Processing chunk {idx+1}/{len(chunks)}..."})
207
  yield messages, None
208