zamal commited on
Commit
69eb8c1
·
verified ·
1 Parent(s): 6293633

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
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.Client(Settings(
259
- chroma_db_impl="duckdb+parquet",
260
- persist_directory=pd
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")