feature:pdf embedding test

This commit is contained in:
chenketing
2023-05-11 20:28:15 +08:00
parent 0c241dfaad
commit ed855df01d
5 changed files with 11 additions and 51 deletions

View File

@@ -0,0 +1,10 @@
from pilot.source_embedding.pdf_embedding import PDFEmbedding
path = "xxx.pdf"
model_name = "/Users/chenketing/Desktop/project/all-MiniLM-L6-v2"
vector_store_path = "/pilot/source_embedding/"
pdf_embedding = PDFEmbedding(file_path=path, model_name=model_name, vector_store_config={"vector_store_name": "ob", "vector_store_path": "vector_store_path"})
pdf_embedding.source_embedding()
print("success")