ppsingh commited on
Commit
26c9862
1 Parent(s): 0dbb0cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -19,7 +19,8 @@ from langchain_huggingface import HuggingFaceEndpoint
19
  from dotenv import load_dotenv
20
  load_dotenv()
21
  HF_token = os.environ["HF_TOKEN"]
22
-
 
23
 
24
  # -------------------------------------------------------------
25
  # Functions
@@ -84,7 +85,13 @@ async def chat(query,history,sources,reports):
84
  print(f"reports:{reports}")
85
  docs_html = ""
86
  output_query = ""
87
- output_language = "English"
 
 
 
 
 
 
88
 
89
  yield history,docs_html
90
  #process_pdf()
 
19
  from dotenv import load_dotenv
20
  load_dotenv()
21
  HF_token = os.environ["HF_TOKEN"]
22
+ # process all files and get the vectorstores collections
23
+ vectorstores = process_pdf()
24
 
25
  # -------------------------------------------------------------
26
  # Functions
 
85
  print(f"reports:{reports}")
86
  docs_html = ""
87
  output_query = ""
88
+
89
+
90
+ if reports is not None:
91
+ vectorstore = vectorstores[source]
92
+ else:
93
+ vectorstore = vectorstores["allreports"]
94
+
95
 
96
  yield history,docs_html
97
  #process_pdf()