Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ docs = splitter.split_documents(docs)
|
|
114 |
|
115 |
# Convert the document chunks to embeddings
|
116 |
embedding_model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
|
117 |
-
embeddings = [embedding_model.encode(doc.
|
118 |
|
119 |
# Save the embeddings to the vector store
|
120 |
vectorstore = Chroma.from_embeddings(embeddings=embeddings, documents=docs, persist_directory="./data")
|
@@ -171,3 +171,4 @@ demo.launch(debug=True)
|
|
171 |
|
172 |
|
173 |
|
|
|
|
114 |
|
115 |
# Convert the document chunks to embeddings
|
116 |
embedding_model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
|
117 |
+
embeddings = [embedding_model.encode(doc.page_content) for doc in docs]
|
118 |
|
119 |
# Save the embeddings to the vector store
|
120 |
vectorstore = Chroma.from_embeddings(embeddings=embeddings, documents=docs, persist_directory="./data")
|
|
|
171 |
|
172 |
|
173 |
|
174 |
+
|