Shubham170793 commited on
Commit
e12544c
Β·
verified Β·
1 Parent(s): 2f812ee

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -1
src/streamlit_app.py CHANGED
@@ -188,8 +188,9 @@ else:
188
 
189
  if temp_path:
190
  with st.spinner("πŸ” Processing document..."):
191
- text, toc = extract_text_from_pdf(temp_path)
192
  chunks = chunk_text(text, chunk_size=chunk_size, overlap=overlap)
 
193
  with st.spinner("βš™οΈ Building search index..."):
194
  embeddings = cache_embeddings(os.path.basename(temp_path), chunks, embed_chunks)
195
  index = build_faiss_index(embeddings)
 
188
 
189
  if temp_path:
190
  with st.spinner("πŸ” Processing document..."):
191
+ text, toc, toc_source = extract_text_from_pdf(temp_path)
192
  chunks = chunk_text(text, chunk_size=chunk_size, overlap=overlap)
193
+ st.caption(f"πŸ“˜ TOC Source: {toc_source}")
194
  with st.spinner("βš™οΈ Building search index..."):
195
  embeddings = cache_embeddings(os.path.basename(temp_path), chunks, embed_chunks)
196
  index = build_faiss_index(embeddings)