Pudding48 commited on
Commit
d4816a3
·
verified ·
1 Parent(s): fa84664

Update prepare_vector_dp.py

Browse files
Files changed (1) hide show
  1. prepare_vector_dp.py +2 -2
prepare_vector_dp.py CHANGED
@@ -59,7 +59,7 @@ def create_db_from_text():
59
  embedding_model = GPT4AllEmbeddings(model_file= model_file)
60
  '''
61
 
62
- embedding_model = HuggingFaceEmbeddings(model_name = "sentence-transformers/all-MiniLM-L6-v2")
63
 
64
  # Dua vao Faiss Vector DB
65
  db = FAISS.from_texts(texts=chunks, embedding=embedding_model)
@@ -81,7 +81,7 @@ def create_dp_from_files():
81
  text_splitter = CharacterTextSplitter(chunk_size = 512, chunk_overlap = 50)
82
  chunks = text_splitter.split_documents(documents)
83
 
84
- embedding_model = HuggingFaceEmbeddings(model_name = "sentence-transformers/all-MiniLM-L6-v2")
85
  dp = FAISS.from_documents(chunks, embedding_model)
86
  dp.save_local(vector_dp_path)
87
  return dp
 
59
  embedding_model = GPT4AllEmbeddings(model_file= model_file)
60
  '''
61
 
62
+ embedding_model = HuggingFaceEmbeddings(model_name = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")
63
 
64
  # Dua vao Faiss Vector DB
65
  db = FAISS.from_texts(texts=chunks, embedding=embedding_model)
 
81
  text_splitter = CharacterTextSplitter(chunk_size = 512, chunk_overlap = 50)
82
  chunks = text_splitter.split_documents(documents)
83
 
84
+ embedding_model = HuggingFaceEmbeddings(model_name = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2")
85
  dp = FAISS.from_documents(chunks, embedding_model)
86
  dp.save_local(vector_dp_path)
87
  return dp