ppsingh commited on
Commit
269adcf
1 Parent(s): 08bcc7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -32,9 +32,9 @@ HF_token = os.environ["HF_TOKEN"]
32
  # process all files and get the vectorstores collections
33
  # vectorestore colection are stored on persistent storage so this needs to be run only once
34
  # hence, comment out line below when creating for first time
35
- # vectorstores = process_pdf()
36
  # once the vectore embeddings are created we will qdrant client to access these
37
- vectorstores = get_local_qdrant()
38
 
39
  # -------------------------------------------------------------
40
  # Functions
@@ -104,11 +104,9 @@ async def chat(query,history,sources,reports,subtype,year):
104
 
105
  ##------------------------decide which collection to fetch------------------------------
106
  if len(reports) == 0:
107
- print("done")
108
- #vectorstore = get_local_qdrant(client,sources)
109
  else:
110
- print("done")
111
- #vectorstore = get_local_qdrant(client,"allreports")
112
 
113
  ##------------------------------get context----------------------------------------------------
114
  #context_retrieved_lst = []
 
32
  # process all files and get the vectorstores collections
33
  # vectorestore colection are stored on persistent storage so this needs to be run only once
34
  # hence, comment out line below when creating for first time
35
+ vectorstores = process_pdf()
36
  # once the vectore embeddings are created we will qdrant client to access these
37
+ #vectorstores = get_local_qdrant()
38
 
39
  # -------------------------------------------------------------
40
  # Functions
 
104
 
105
  ##------------------------decide which collection to fetch------------------------------
106
  if len(reports) == 0:
107
+ vectorstore = vectorstores[source]
 
108
  else:
109
+ vectorstore = vectorstores["allreports"]
 
110
 
111
  ##------------------------------get context----------------------------------------------------
112
  #context_retrieved_lst = []