Spaces:
Sleeping
Sleeping
MatteoScript
commited on
Commit
•
b426474
1
Parent(s):
bfca1c7
Update app.py
Browse files
app.py
CHANGED
@@ -48,8 +48,7 @@ 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 |
-
|
52 |
-
vectordb = Chroma.from_documents(documents=splits, embedding=embedding, persist_directory="./chroma_db")
|
53 |
return vectordb
|
54 |
|
55 |
|
|
|
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 |
return vectordb
|
53 |
|
54 |
|