Chris4K commited on
Commit
cbed288
·
1 Parent(s): 59071bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.load_and_split()
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):
 
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):