Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -96,12 +96,12 @@ Here are some documents and their source links that are relevant to the question
|
|
96 |
# Define the predict function that runs when 'Submit' is clicked or when a API request is made
|
97 |
def predict(user_input,company):
|
98 |
|
99 |
-
|
100 |
-
relevant_document_chunks = vectorstore_persisted.similarity_search(user_input, k=5, filter={"source":
|
101 |
|
102 |
# Create context_for_query
|
103 |
user_input = user_input
|
104 |
-
relevant_document_chunks = vectorstore_persisted.similarity_search(user_input,k=5,filter={"source":
|
105 |
context_list = [d.page_content for d in relevant_document_chunks]
|
106 |
context_for_query = ". ".join(context_list)
|
107 |
|
|
|
96 |
# Define the predict function that runs when 'Submit' is clicked or when a API request is made
|
97 |
def predict(user_input,company):
|
98 |
|
99 |
+
filter_company = "/content/dataset/"+company+"-10-k-2023.pdf"
|
100 |
+
#relevant_document_chunks = vectorstore_persisted.similarity_search(user_input, k=5, filter={"source":filter_company})
|
101 |
|
102 |
# Create context_for_query
|
103 |
user_input = user_input
|
104 |
+
relevant_document_chunks = vectorstore_persisted.similarity_search(user_input,k=5,filter={"source":filter_company})
|
105 |
context_list = [d.page_content for d in relevant_document_chunks]
|
106 |
context_for_query = ". ".join(context_list)
|
107 |
|