Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -254,11 +254,14 @@ def conversation(
|
|
254 |
if not session.get("processed") or not pd:
|
255 |
raise gr.Error("Please extract data first")
|
256 |
|
257 |
-
# 1) Reopen the same persistent client
|
258 |
-
client = chromadb.
|
259 |
-
|
260 |
-
|
261 |
-
|
|
|
|
|
|
|
262 |
|
263 |
# 2) Text retrieval
|
264 |
text_col = client.get_collection("text_db")
|
|
|
254 |
if not session.get("processed") or not pd:
|
255 |
raise gr.Error("Please extract data first")
|
256 |
|
257 |
+
# 1) Reopen the same persistent client (new API)
|
258 |
+
client = chromadb.PersistentClient(
|
259 |
+
path=pd,
|
260 |
+
settings=Settings(),
|
261 |
+
tenant=DEFAULT_TENANT,
|
262 |
+
database=DEFAULT_DATABASE
|
263 |
+
)
|
264 |
+
|
265 |
|
266 |
# 2) Text retrieval
|
267 |
text_col = client.get_collection("text_db")
|