AreesaAshfaq commited on
Commit
4ce2673
·
verified ·
1 Parent(s): b0ac7e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -71,7 +71,7 @@ else:
71
  return None
72
 
73
  # Check the first document's content to ensure it's loaded correctly
74
- st.write(f"First document content preview: {docs[0].page_content[:500]}") # Show the first 500 characters of the first document
75
 
76
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
77
  splits = text_splitter.split_documents(docs)
@@ -84,12 +84,12 @@ else:
84
  return None
85
 
86
  # Check the first split's content to ensure it's split correctly
87
- st.write(f"First split content preview: {splits[0].page_content[:500]}") # Show the first 500 characters of the first split
88
 
89
  vectorstore = Chroma.from_documents(documents=splits, embedding=embedding_model)
90
 
91
  # Debugging output
92
- st.write(f"Vectorstore created with {len(splits)} documents.")
93
 
94
  if vectorstore is None:
95
  st.error("Failed to create the vectorstore.")
 
71
  return None
72
 
73
  # Check the first document's content to ensure it's loaded correctly
74
+ #st.write(f"First document content preview: {docs[0].page_content[:500]}") # Show the first 500 characters of the first document
75
 
76
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
77
  splits = text_splitter.split_documents(docs)
 
84
  return None
85
 
86
  # Check the first split's content to ensure it's split correctly
87
+ #st.write(f"First split content preview: {splits[0].page_content[:500]}") # Show the first 500 characters of the first split
88
 
89
  vectorstore = Chroma.from_documents(documents=splits, embedding=embedding_model)
90
 
91
  # Debugging output
92
+ #st.write(f"Vectorstore created with {len(splits)} documents.")
93
 
94
  if vectorstore is None:
95
  st.error("Failed to create the vectorstore.")