notebook fmt (#12498)

This commit is contained in:
Bagatur
2023-10-29 15:50:09 -07:00
committed by GitHub
parent 56cc5b847c
commit 2424fff3f1
342 changed files with 8261 additions and 6796 deletions

View File

@@ -15,9 +15,7 @@ def ingest_documents():
# Load list of pdfs
company_name = "Nike"
data_path = "data/"
doc = [
os.path.join(data_path, file) for file in os.listdir(data_path)
][0]
doc = [os.path.join(data_path, file) for file in os.listdir(data_path)][0]
print("Parsing 10k filing doc for NIKE", doc)
@@ -29,9 +27,7 @@ def ingest_documents():
print("Done preprocessing. Created", len(chunks), "chunks of the original pdf")
# Create vectorstore
embedder = HuggingFaceEmbeddings(
model_name=EMBED_MODEL
)
embedder = HuggingFaceEmbeddings(model_name=EMBED_MODEL)
_ = Redis.from_texts(
# appending this little bit can sometimes help with semantic retrieval
@@ -41,7 +37,7 @@ def ingest_documents():
embedding=embedder,
index_name=INDEX_NAME,
index_schema=INDEX_SCHEMA,
redis_url=REDIS_URL
redis_url=REDIS_URL,
)