Pudding48 commited on
Commit
4cf1a7c
·
verified ·
1 Parent(s): 7310f1a

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_file = "sentence-transformers/all-MiniLM-L6-v2")
63
 
64
  # Dua vao Faiss Vector DB
65
  db = FAISS.from_texts(texts=chunks, embedding=embedding_model)
@@ -76,7 +76,7 @@ def create_dp_from_files():
76
  text_splitter = CharacterTextSplitter(chunk_size = 512, chunk_overlap = 50)
77
  chunks = text_splitter.split_documents(documents)
78
 
79
- embedding_model = HuggingFaceEmbeddings(model_file = "sentence-transformers/all-MiniLM-L6-v2")
80
  dp = FAISS.from_documents(chunks, embedding_model)
81
  dp.save_local(vector_dp_path)
82
  return dp
 
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)
 
76
  text_splitter = CharacterTextSplitter(chunk_size = 512, chunk_overlap = 50)
77
  chunks = text_splitter.split_documents(documents)
78
 
79
+ embedding_model = HuggingFaceEmbeddings(model_name = "sentence-transformers/all-MiniLM-L6-v2")
80
  dp = FAISS.from_documents(chunks, embedding_model)
81
  dp.save_local(vector_dp_path)
82
  return dp