Update app.py
Browse files
app.py
CHANGED
@@ -14,15 +14,15 @@ api_hf_embeddings = HuggingFaceInferenceAPIEmbeddings(
|
|
14 |
# Load and process the PDF files
|
15 |
loader = PyPDFLoader("new_papers/ReACT.pdf")
|
16 |
loader
|
17 |
-
documents = loader.
|
18 |
print("-----------")
|
19 |
print(documents)
|
20 |
print("-----------")
|
21 |
|
22 |
|
23 |
# Create Chroma vector store for API embeddings
|
24 |
-
|
25 |
-
api_db = Chroma.from_texts(documents, api_hf_embeddings, collection_name="api-collection")
|
26 |
|
27 |
class PDFRetrievalTool:
|
28 |
def __init__(self, retriever):
|
|
|
14 |
# Load and process the PDF files
|
15 |
loader = PyPDFLoader("new_papers/ReACT.pdf")
|
16 |
loader
|
17 |
+
documents = loader.load()
|
18 |
print("-----------")
|
19 |
print(documents)
|
20 |
print("-----------")
|
21 |
|
22 |
|
23 |
# Create Chroma vector store for API embeddings
|
24 |
+
api_db = Chroma.from_documents(documents, api_hf_embeddings, collection_name="api-collection")
|
25 |
+
#api_db = Chroma.from_texts(documents, api_hf_embeddings, collection_name="api-collection")
|
26 |
|
27 |
class PDFRetrievalTool:
|
28 |
def __init__(self, retriever):
|