Upload embed_documents.py
Browse files
retriever/embed_documents.py
CHANGED
@@ -29,7 +29,7 @@ from langchain_huggingface import HuggingFaceEmbeddings
|
|
29 |
from config import ConfigConstants
|
30 |
|
31 |
|
32 |
-
def embed_documents(documents: List[Dict], embedding_path: str = "
|
33 |
logging.info(f"Total documents got :{len(documents)}")
|
34 |
os.makedirs(os.path.dirname(embedding_path), exist_ok=True)
|
35 |
os.makedirs(os.path.dirname(metadata_path), exist_ok=True)
|
|
|
29 |
from config import ConfigConstants
|
30 |
|
31 |
|
32 |
+
def embed_documents(documents: List[Dict], embedding_path: str = ConfigConstants.DATA_SET_PATH + "embeddings/embeddings.faiss", metadata_path: str = ConfigConstants.DATA_SET_PATH + "embeddings/metadata.json") -> FAISS:
|
33 |
logging.info(f"Total documents got :{len(documents)}")
|
34 |
os.makedirs(os.path.dirname(embedding_path), exist_ok=True)
|
35 |
os.makedirs(os.path.dirname(metadata_path), exist_ok=True)
|