Spaces:
Runtime error
Runtime error
Update agent.py
Browse files
agent.py
CHANGED
@@ -393,7 +393,8 @@ embedding_model = HuggingFaceEmbeddings(model_name="sentence-transformers/all-Mi
|
|
393 |
docs = [Document(page_content=text, metadata={"task_id": item["task_id"]}) for item in data]
|
394 |
|
395 |
# Create the FAISS index
|
396 |
-
vector_store = FAISS.from_documents(docs, embedding_model)
|
|
|
397 |
|
398 |
# Save the FAISS index
|
399 |
vector_store = MyVectorStore(index)
|
|
|
393 |
docs = [Document(page_content=text, metadata={"task_id": item["task_id"]}) for item in data]
|
394 |
|
395 |
# Create the FAISS index
|
396 |
+
#vector_store = FAISS.from_documents(docs, embedding_model)
|
397 |
+
vector_store = FAISS.from_texts(texts = text_chunks, embedding = embeddings)
|
398 |
|
399 |
# Save the FAISS index
|
400 |
vector_store = MyVectorStore(index)
|