Spaces:
Runtime error
Runtime error
Update agent.py
Browse files
agent.py
CHANGED
@@ -416,8 +416,7 @@ texts = [doc.page_content for doc in docs]
|
|
416 |
# Initialize the embedding model
|
417 |
embedding_model = BERTEmbeddings()
|
418 |
|
419 |
-
|
420 |
-
embeddings = [embedding_model.encode(text) for text in texts]
|
421 |
|
422 |
# Create the FAISS index
|
423 |
vector_store = FAISS.from_documents(docs, embedding_model)
|
|
|
416 |
# Initialize the embedding model
|
417 |
embedding_model = BERTEmbeddings()
|
418 |
|
419 |
+
embeddings = [embedding_model.embed_query(text) for text in texts]
|
|
|
420 |
|
421 |
# Create the FAISS index
|
422 |
vector_store = FAISS.from_documents(docs, embedding_model)
|