MatteoScript commited on
Commit
bfca1c7
1 Parent(s): 40e59f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -48,12 +48,8 @@ def load_doc(list_file_path, chunk_size, chunk_overlap):
48
  def create_db(splits, collection_name):
49
  embedding = HuggingFaceEmbeddings(model_name="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")
50
  new_client = chromadb.EphemeralClient()
51
- vectordb = Chroma.from_documents(
52
- documents=splits,
53
- embedding=embedding,
54
- persist_directory="./chroma_db",
55
- client=new_client,
56
- collection_name=collection_name)
57
  return vectordb
58
 
59
 
 
48
  def create_db(splits, collection_name):
49
  embedding = HuggingFaceEmbeddings(model_name="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")
50
  new_client = chromadb.EphemeralClient()
51
+ #vectordb = Chroma.from_documents(documents=splits, embedding=embedding, persist_directory="./chroma_db", client=new_client, collection_name=collection_name)
52
+ vectordb = Chroma.from_documents(documents=splits, embedding=embedding, persist_directory="./chroma_db")
 
 
 
 
53
  return vectordb
54
 
55