Spaces:
Paused
Paused
Upload Index.py
Browse files
Index.py
CHANGED
@@ -67,7 +67,7 @@ retriever = None
|
|
67 |
def initialize_vectorstore():
|
68 |
|
69 |
webpage_loader = WebBaseLoader("https://www.tredence.com/case-studies/tredence-helped-a-global-retailer-providing-holistic-campaign-analytics-by-using-the-power-of-gcp").load()
|
70 |
-
webpage_chunks =
|
71 |
|
72 |
# store embeddings in vector store
|
73 |
vectorstore = FAISS.from_documents(webpage_chunks, embedder)
|
@@ -79,7 +79,7 @@ def initialize_vectorstore():
|
|
79 |
|
80 |
def _text_splitter(doc):
|
81 |
text_splitter = RecursiveCharacterTextSplitter(
|
82 |
-
chunk_size=500,
|
83 |
chunk_overlap=50,
|
84 |
length_function=len,
|
85 |
)
|
|
|
67 |
def initialize_vectorstore():
|
68 |
|
69 |
webpage_loader = WebBaseLoader("https://www.tredence.com/case-studies/tredence-helped-a-global-retailer-providing-holistic-campaign-analytics-by-using-the-power-of-gcp").load()
|
70 |
+
webpage_chunks = _text_splitter.(webpage_loader)
|
71 |
|
72 |
# store embeddings in vector store
|
73 |
vectorstore = FAISS.from_documents(webpage_chunks, embedder)
|
|
|
79 |
|
80 |
def _text_splitter(doc):
|
81 |
text_splitter = RecursiveCharacterTextSplitter(
|
82 |
+
#chunk_size=500,
|
83 |
chunk_overlap=50,
|
84 |
length_function=len,
|
85 |
)
|