Namitg02 commited on
Commit
dbbd078
·
verified ·
1 Parent(s): bb05ee7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -23,10 +23,11 @@ print(dataset)
23
  splitter = RecursiveCharacterTextSplitter(chunk_size=100, chunk_overlap=15,separators=["\n\n", "\n", " ", ""])
24
  docs = splitter.create_documents(str(dataset))
25
  # Returns a list of documents
26
-
27
  embedding_model = HuggingFaceEmbeddings(model_name = "all-MiniLM-L6-v2")
28
- embed = embedding_model.embed_documents(docs)
29
- #docs_text = [doc.text for doc in docs]
 
30
  data = FAISS.from_embeddings(embed, embedding_model)
31
  #data = FAISS.from_texts(docs, embedding_model)
32
 
 
23
  splitter = RecursiveCharacterTextSplitter(chunk_size=100, chunk_overlap=15,separators=["\n\n", "\n", " ", ""])
24
  docs = splitter.create_documents(str(dataset))
25
  # Returns a list of documents
26
+ print(docs)
27
  embedding_model = HuggingFaceEmbeddings(model_name = "all-MiniLM-L6-v2")
28
+ docs_text = [doc.text for doc in docs]
29
+ embed = embedding_model.embed_documents(docs_text)
30
+
31
  data = FAISS.from_embeddings(embed, embedding_model)
32
  #data = FAISS.from_texts(docs, embedding_model)
33