Upload app.py
Browse files
app.py
CHANGED
|
@@ -84,6 +84,10 @@ Here are some documents that are relevant to the question mentioned below.
|
|
| 84 |
|
| 85 |
# Define the predict function that runs when 'Submit' is clicked or when a API request is made
|
| 86 |
def predict(user_input,company):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
filter = "dataset/"+company+"-10-k-2023.pdf"
|
| 89 |
relevant_document_chunks = vectorstore_persisted.similarity_search(user_input, k=5, filter={"source":filter})
|
|
|
|
| 84 |
|
| 85 |
# Define the predict function that runs when 'Submit' is clicked or when a API request is made
|
| 86 |
def predict(user_input,company):
|
| 87 |
+
sample = {
|
| 88 |
+
'user_input'=user_input,
|
| 89 |
+
'company'=company
|
| 90 |
+
}
|
| 91 |
|
| 92 |
filter = "dataset/"+company+"-10-k-2023.pdf"
|
| 93 |
relevant_document_chunks = vectorstore_persisted.similarity_search(user_input, k=5, filter={"source":filter})
|