Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -154,15 +154,17 @@ if st.session_state.chunked and not st.session_state.vector_created:
|
|
| 154 |
query = None
|
| 155 |
|
| 156 |
# Step 1: No PDF Provided Yet
|
| 157 |
-
if not st.session_state.pdf_path:
|
| 158 |
st.info("📥 **Please upload a PDF or enter a valid URL to proceed.**")
|
| 159 |
|
| 160 |
# Step 2: PDF URL Exists but Not Processed Yet
|
| 161 |
-
elif st.session_state.pdf_path and not st.session_state.pdf_loaded:
|
| 162 |
st.warning("⚠️ **PDF detected! Click 'Download and Process PDF' to start processing.**")
|
| 163 |
|
| 164 |
-
# Step 3: Processing in Progress
|
| 165 |
-
elif
|
|
|
|
|
|
|
| 166 |
st.info("⏳ **Processing your document... Please wait.**")
|
| 167 |
|
| 168 |
# Step 4: Processing Complete, Ready for Questions
|
|
|
|
| 154 |
query = None
|
| 155 |
|
| 156 |
# Step 1: No PDF Provided Yet
|
| 157 |
+
if not st.session_state.pdf_path and not st.session_state.get("trigger_download", False):
|
| 158 |
st.info("📥 **Please upload a PDF or enter a valid URL to proceed.**")
|
| 159 |
|
| 160 |
# Step 2: PDF URL Exists but Not Processed Yet
|
| 161 |
+
elif st.session_state.pdf_path and not st.session_state.pdf_loaded and not st.session_state.get("trigger_download", False):
|
| 162 |
st.warning("⚠️ **PDF detected! Click 'Download and Process PDF' to start processing.**")
|
| 163 |
|
| 164 |
+
# Step 3: Processing in Progress
|
| 165 |
+
elif st.session_state.get("trigger_download", False) and (
|
| 166 |
+
not st.session_state.pdf_loaded or not st.session_state.chunked or not st.session_state.vector_created
|
| 167 |
+
):
|
| 168 |
st.info("⏳ **Processing your document... Please wait.**")
|
| 169 |
|
| 170 |
# Step 4: Processing Complete, Ready for Questions
|