Update src/streamlit_app.py
Browse files- 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)
|