Skip to content

Commit

Permalink
hf embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
geemi725 committed Feb 28, 2024
1 parent b1fe3b2 commit db26fe2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_xpertai.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ def test_load_split_docs():
assert isinstance(docs_split[0].page_content, str)

def test_vector_db():
from langchain.embeddings import HuggingFaceEmbeddings

base_dir = os.path.dirname(os.path.realpath("__file__"))
lit_file = os.path.join(base_dir, "tests/paper_test.pdf")
vector_db(lit_file=lit_file, try_meta_data=True, clean=True)
embedding = HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2")
vector_db(lit_file=lit_file, try_meta_data=True, clean=True, embedding=embedding)
assert os.path.exists("./data/chroma/") is True


Expand Down

0 comments on commit db26fe2

Please sign in to comment.