OuroborosM commited on
Commit
7da2edb
·
1 Parent(s): 8bb0a31

update summary

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -347,6 +347,7 @@ def UpdateDb():
347
 
348
  def SummarizeDoc():
349
  global vectordb_p
 
350
  # pinecone.Index(index_name).delete(delete_all=True, namespace='')
351
  # collection = vectordb_p.get()
352
  # split_docs = process_documents([metadata['source'] for metadata in collection['metadatas']])
@@ -356,7 +357,10 @@ def SummarizeDoc():
356
  print(split_docs[tt-1])
357
  sum_text=""
358
  try:
359
- sum_chain = load_summarize_chain(llm, chain_type='refine', verbose=True)
 
 
 
360
  sum_text = sum_chain.run(split_docs)
361
  return sum_text
362
  except Exception as e:
 
347
 
348
  def SummarizeDoc():
349
  global vectordb_p
350
+ global Choice
351
  # pinecone.Index(index_name).delete(delete_all=True, namespace='')
352
  # collection = vectordb_p.get()
353
  # split_docs = process_documents([metadata['source'] for metadata in collection['metadatas']])
 
357
  print(split_docs[tt-1])
358
  sum_text=""
359
  try:
360
+ if Choice == 'Zero Short React 2' or Choice == "Zero Short Agent 2":
361
+ sum_chain = load_summarize_chain(GPTfake, chain_type='refine', verbose=True)
362
+ else:
363
+ sum_chain = load_summarize_chain(llm, chain_type='refine', verbose=True)
364
  sum_text = sum_chain.run(split_docs)
365
  return sum_text
366
  except Exception as e: