jedick commited on
Commit
cc54402
·
1 Parent(s): 8cb166c

Revert fix for ChromaDB ValueError

Browse files
Files changed (3) hide show
  1. app.py +0 -1
  2. requirements.txt +2 -0
  3. retriever.py +4 -3
app.py CHANGED
@@ -82,7 +82,6 @@ def run_workflow(input, history, compute_mode, thread_id, session_hash):
82
  if compute_mode == "local":
83
  gr.Info(
84
  f"Please wait for the local model to load",
85
- duration=15,
86
  title=f"Model loading...",
87
  )
88
  # Get the chat model and build the graph
 
82
  if compute_mode == "local":
83
  gr.Info(
84
  f"Please wait for the local model to load",
 
85
  title=f"Model loading...",
86
  )
87
  # Get the chat model and build the graph
requirements.txt CHANGED
@@ -29,3 +29,5 @@ spaces==0.37.1
29
  #boto3==1.39.14
30
  # Others
31
  python-dotenv
 
 
 
29
  #boto3==1.39.14
30
  # Others
31
  python-dotenv
32
+ # For snapshot_download
33
+ huggingface-hub==0.33.2
retriever.py CHANGED
@@ -174,9 +174,10 @@ def BuildRetrieverDense(compute_mode: str, top_k=6):
174
  # Get top k documents
175
  search_kwargs={"k": top_k},
176
  )
177
- # Fix for ValueError('Could not connect to tenant default_tenant. Are you sure it exists?')
178
- # https://github.com/langchain-ai/langchain/issues/26884
179
- chromadb.api.client.SharedSystemClient.clear_system_cache()
 
180
  return retriever
181
 
182
 
 
174
  # Get top k documents
175
  search_kwargs={"k": top_k},
176
  )
177
+ ## Fix for ValueError('Could not connect to tenant default_tenant. Are you sure it exists?')
178
+ ## ... but it breaks retrieval on ZeroGPU
179
+ ## https://github.com/langchain-ai/langchain/issues/26884
180
+ # chromadb.api.client.SharedSystemClient.clear_system_cache()
181
  return retriever
182
 
183