Abdullahrasheed45 commited on
Commit
ee022fc
·
verified ·
1 Parent(s): c5e31f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -24,11 +24,9 @@ embeddings = GoogleGenerativeAIEmbeddings(
24
  google_api_key=GOOGLE_API_KEY # Explicitly pass the API key
25
  )
26
  raw_documents = TextLoader("tagged_description.txt").load()
27
- text_splitter = CharacterTextSplitter(
28
- separator="\n\n", # Use double newlines to better separate paragraphs
29
- chunk_size=512,
30
- chunk_overlap=50
31
- )
32
  documents = text_splitter.split_documents(raw_documents)
33
  db_books = Chroma.from_documents(documents, embeddings)
34
 
 
24
  google_api_key=GOOGLE_API_KEY # Explicitly pass the API key
25
  )
26
  raw_documents = TextLoader("tagged_description.txt").load()
27
+
28
+ text_splitter = CharacterTextSplitter(separator="\n", chunk_size=0, chunk_overlap=0)
29
+
 
 
30
  documents = text_splitter.split_documents(raw_documents)
31
  db_books = Chroma.from_documents(documents, embeddings)
32