Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ if not st.session_state.chunked: # Ensure chunking only happens once
|
|
104 |
st.session_state.documents = cached_chunks
|
105 |
st.session_state.chunked = True
|
106 |
|
107 |
-
# Step 3: Chunking
|
108 |
if st.session_state.pdf_loaded and not st.session_state.chunked:
|
109 |
with st.spinner("Chunking the document..."):
|
110 |
try:
|
@@ -188,9 +188,9 @@ if query:
|
|
188 |
#st.write("Extracted Context (page_content):", context)
|
189 |
#st.write("Number of Extracted Contexts:", len(context))
|
190 |
|
191 |
-
st.write("π **Relevant Passages Retrieved:**")
|
192 |
-
for idx, doc in enumerate(contexts):
|
193 |
-
st.write(f"**Excerpt {idx+1}:** {doc.page_content}")
|
194 |
|
195 |
|
196 |
relevancy_prompt = """You are an expert judge tasked with evaluating whether the EACH OF THE CONTEXT provided in the CONTEXT LIST is self sufficient to answer the QUERY asked.
|
|
|
104 |
st.session_state.documents = cached_chunks
|
105 |
st.session_state.chunked = True
|
106 |
|
107 |
+
# Step 3: Chunking
|
108 |
if st.session_state.pdf_loaded and not st.session_state.chunked:
|
109 |
with st.spinner("Chunking the document..."):
|
110 |
try:
|
|
|
188 |
#st.write("Extracted Context (page_content):", context)
|
189 |
#st.write("Number of Extracted Contexts:", len(context))
|
190 |
|
191 |
+
#st.write("π **Relevant Passages Retrieved:**")
|
192 |
+
#for idx, doc in enumerate(contexts):
|
193 |
+
#st.write(f"**Excerpt {idx+1}:** {doc.page_content}")
|
194 |
|
195 |
|
196 |
relevancy_prompt = """You are an expert judge tasked with evaluating whether the EACH OF THE CONTEXT provided in the CONTEXT LIST is self sufficient to answer the QUERY asked.
|