Spaces:
Running
Running
MVPilgrim
commited on
Commit
·
b686b94
1
Parent(s):
182be0b
debug
Browse files
app.py
CHANGED
|
@@ -211,6 +211,7 @@ try:
|
|
| 211 |
]
|
| 212 |
}
|
| 213 |
wpCollection = client.collections.create_from_dict(class_obj)
|
|
|
|
| 214 |
logger.info("#### createWebpageCollection() exited.")
|
| 215 |
|
| 216 |
|
|
@@ -263,6 +264,7 @@ try:
|
|
| 263 |
]
|
| 264 |
}
|
| 265 |
wpChunkCollection = client.collections.create_from_dict(class_obj)
|
|
|
|
| 266 |
logger.info("#### createChunksCollection() exited.")
|
| 267 |
|
| 268 |
|
|
@@ -370,6 +372,7 @@ try:
|
|
| 370 |
|
| 371 |
# Fetch chunks and print chunks.
|
| 372 |
logger.debug("#### Retrieve semchunks from db using vectors from prompt.")
|
|
|
|
| 373 |
semChunks = wpChunkCollection.query.near_vector(
|
| 374 |
near_vector=vectorList,
|
| 375 |
distance=0.7,
|
|
@@ -380,6 +383,7 @@ try:
|
|
| 380 |
# Print chunks, corresponding document and document title.
|
| 381 |
ragData = ""
|
| 382 |
logger.debug("#### Print individual retrieved chunks.")
|
|
|
|
| 383 |
for chunk in enumerate(semChunks.objects):
|
| 384 |
logger.info(f"#### chunk: {chunk}")
|
| 385 |
ragData = ragData + "\n" + chunk[0]
|
|
|
|
| 211 |
]
|
| 212 |
}
|
| 213 |
wpCollection = client.collections.create_from_dict(class_obj)
|
| 214 |
+
st.session_state.wpCollection = wpCollection
|
| 215 |
logger.info("#### createWebpageCollection() exited.")
|
| 216 |
|
| 217 |
|
|
|
|
| 264 |
]
|
| 265 |
}
|
| 266 |
wpChunkCollection = client.collections.create_from_dict(class_obj)
|
| 267 |
+
st.session_state.wpCollection = wpCollection
|
| 268 |
logger.info("#### createChunksCollection() exited.")
|
| 269 |
|
| 270 |
|
|
|
|
| 372 |
|
| 373 |
# Fetch chunks and print chunks.
|
| 374 |
logger.debug("#### Retrieve semchunks from db using vectors from prompt.")
|
| 375 |
+
wpChunkCollection = st.session_state.wpChunkCollection
|
| 376 |
semChunks = wpChunkCollection.query.near_vector(
|
| 377 |
near_vector=vectorList,
|
| 378 |
distance=0.7,
|
|
|
|
| 383 |
# Print chunks, corresponding document and document title.
|
| 384 |
ragData = ""
|
| 385 |
logger.debug("#### Print individual retrieved chunks.")
|
| 386 |
+
wpCollection = st.session_state.wpCollection
|
| 387 |
for chunk in enumerate(semChunks.objects):
|
| 388 |
logger.info(f"#### chunk: {chunk}")
|
| 389 |
ragData = ragData + "\n" + chunk[0]
|