Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -221,6 +221,10 @@ def main():
|
|
| 221 |
if st.button("Process PDFs"):
|
| 222 |
if pdf_docs:
|
| 223 |
with st.spinner("Processing..."):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
# 1. Get Documents (not string)
|
| 225 |
raw_documents = get_pdf_text(pdf_docs)
|
| 226 |
# 2. Split Documents (preserves metadata)
|
|
|
|
| 221 |
if st.button("Process PDFs"):
|
| 222 |
if pdf_docs:
|
| 223 |
with st.spinner("Processing..."):
|
| 224 |
+
# Clear previous cache to avoid using old vector stores
|
| 225 |
+
st.cache_data.clear()
|
| 226 |
+
st.cache_resource.clear()
|
| 227 |
+
|
| 228 |
# 1. Get Documents (not string)
|
| 229 |
raw_documents = get_pdf_text(pdf_docs)
|
| 230 |
# 2. Split Documents (preserves metadata)
|