Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def embed_fn(inp):
|
|
27 |
documents = text_splitter.split_text(inp)
|
28 |
out_emb= hf.embed_documents(documents)
|
29 |
string_representation = dumps(out_emb, pretty=True)
|
30 |
-
db.from_texts(documents)
|
31 |
|
32 |
def proc_doc(doc_in):
|
33 |
for doc in doc_in:
|
|
|
27 |
documents = text_splitter.split_text(inp)
|
28 |
out_emb= hf.embed_documents(documents)
|
29 |
string_representation = dumps(out_emb, pretty=True)
|
30 |
+
db.from_texts(documents,persist_directory=f"{cwd}/chroma_langchain_db",embedding_function=HuggingFaceEmbeddings(model_name=emb))
|
31 |
|
32 |
def proc_doc(doc_in):
|
33 |
for doc in doc_in:
|