Update app.py
Browse files
app.py
CHANGED
|
@@ -25,8 +25,9 @@ docs = splitter.create_documents(str(dataset))
|
|
| 25 |
# Returns a list of documents
|
| 26 |
|
| 27 |
embedding_model = HuggingFaceEmbeddings(model_name = "all-MiniLM-L6-v2")
|
| 28 |
-
|
| 29 |
-
data = FAISS.from_texts(
|
|
|
|
| 30 |
|
| 31 |
# Returns a FAISS wrapper vector store. Input is a list of strings. from_documents method used documents to Return VectorStore
|
| 32 |
|
|
|
|
| 25 |
# Returns a list of documents
|
| 26 |
|
| 27 |
embedding_model = HuggingFaceEmbeddings(model_name = "all-MiniLM-L6-v2")
|
| 28 |
+
docs_text = [doc.text for doc in docs]
|
| 29 |
+
data = FAISS.from_texts(docs_text, embedding_model)
|
| 30 |
+
#data = FAISS.from_texts(docs, embedding_model)
|
| 31 |
|
| 32 |
# Returns a FAISS wrapper vector store. Input is a list of strings. from_documents method used documents to Return VectorStore
|
| 33 |
|