Update app.py
Browse files
app.py
CHANGED
|
@@ -79,6 +79,7 @@ print("Available collections:", client.list_collections())
|
|
| 79 |
|
| 80 |
|
| 81 |
collection_name = 'report-10k-2024'
|
|
|
|
| 82 |
vectorstore_persisted = Chroma(
|
| 83 |
collection_name=collection_name,
|
| 84 |
persist_directory='./report_10kdb',
|
|
@@ -92,11 +93,7 @@ for doc in results:
|
|
| 92 |
print("Doc:", doc.page_content[:200])
|
| 93 |
print("Metadata:", doc.metadata)
|
| 94 |
|
| 95 |
-
|
| 96 |
-
results = vectorstore_persisted.get(limit=1)
|
| 97 |
-
# Now 'results' will contain the data for the first document in the collection
|
| 98 |
-
first_document = results["documents"][0]
|
| 99 |
-
print(f"first_document {first_document}")
|
| 100 |
# Load the persisted vectorDB
|
| 101 |
|
| 102 |
retriever = vectorstore_persisted.as_retriever(
|
|
|
|
| 79 |
|
| 80 |
|
| 81 |
collection_name = 'report-10k-2024'
|
| 82 |
+
collection_name ='report_10k_collection'
|
| 83 |
vectorstore_persisted = Chroma(
|
| 84 |
collection_name=collection_name,
|
| 85 |
persist_directory='./report_10kdb',
|
|
|
|
| 93 |
print("Doc:", doc.page_content[:200])
|
| 94 |
print("Metadata:", doc.metadata)
|
| 95 |
|
| 96 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
# Load the persisted vectorDB
|
| 98 |
|
| 99 |
retriever = vectorstore_persisted.as_retriever(
|