Spaces:
Sleeping
Sleeping
carlosgonzalezmartinez
commited on
Commit
•
7cb6807
1
Parent(s):
a097779
Update app.py
Browse files
app.py
CHANGED
@@ -149,7 +149,8 @@ def predict(user_input,company):
|
|
149 |
|
150 |
# Create context_for_query
|
151 |
|
152 |
-
|
|
|
153 |
|
154 |
context_list = [d.page_content for d in relevant_document_chunks]
|
155 |
context_for_query = ". ".join(context_list)
|
|
|
149 |
|
150 |
# Create context_for_query
|
151 |
|
152 |
+
filter = "dataset/"+company+"-10-k-2023.pdf"
|
153 |
+
relevant_document_chunks = retriever.invoke(user_input, k=5, filter={"source":filter})
|
154 |
|
155 |
context_list = [d.page_content for d in relevant_document_chunks]
|
156 |
context_for_query = ". ".join(context_list)
|