mobinln commited on
Commit
c06afa2
1 Parent(s): 3af157b

fix: add remove chroma cache

Browse files
Files changed (1) hide show
  1. vector_store.py +2 -0
vector_store.py CHANGED
@@ -1,4 +1,5 @@
1
  import streamlit as st
 
2
  from langchain_huggingface import HuggingFaceEmbeddings
3
  from langchain_chroma import Chroma
4
  from langchain_community.document_loaders import PyPDFLoader
@@ -22,6 +23,7 @@ def load_vector_store():
22
  load vector store on every page load
23
  """
24
  model = load_embedding_model("sentence-transformers/all-MiniLM-L6-v2")
 
25
  vector_store = Chroma(
26
  collection_name="main_store",
27
  embedding_function=model,
 
1
  import streamlit as st
2
+ import chromadb
3
  from langchain_huggingface import HuggingFaceEmbeddings
4
  from langchain_chroma import Chroma
5
  from langchain_community.document_loaders import PyPDFLoader
 
23
  load vector store on every page load
24
  """
25
  model = load_embedding_model("sentence-transformers/all-MiniLM-L6-v2")
26
+ chromadb.api.client.SharedSystemClient.clear_system_cache()
27
  vector_store = Chroma(
28
  collection_name="main_store",
29
  embedding_function=model,