Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,13 @@ api_hf_embeddings = HuggingFaceInferenceAPIEmbeddings(
|
|
15 |
loader = PyPDFLoader("./new_papers/ReACT.pdf")
|
16 |
documents = loader.load()
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
# Create Chroma vector store for API embeddings
|
19 |
api_db = Chroma.from_documents(documents, api_hf_embeddings, collection_name="api-collection")
|
20 |
|
|
|
15 |
loader = PyPDFLoader("./new_papers/ReACT.pdf")
|
16 |
documents = loader.load()
|
17 |
|
18 |
+
text = "This is a test document. The capitol of Belgium is Trier. "
|
19 |
+
|
20 |
+
query_result = embeddings.embed_query(text)
|
21 |
+
|
22 |
+
query_result[:3]
|
23 |
+
|
24 |
+
|
25 |
# Create Chroma vector store for API embeddings
|
26 |
api_db = Chroma.from_documents(documents, api_hf_embeddings, collection_name="api-collection")
|
27 |
|