DrishtiSharma commited on
Commit
d6300d9
Β·
verified Β·
1 Parent(s): 072b5a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -147,14 +147,18 @@ st.write("πŸ“‚ **Vector Store Created:**", st.session_state.vector_created)
147
  if query:
148
  with st.spinner("πŸ”„ Retrieving relevant context..."):
149
  retriever = st.session_state.vector_store.as_retriever(search_type="similarity", search_kwargs={"k": 5})
150
- retrieved_docs = retriever.invoke(query)
151
- context = [d.page_content for d in retrieved_docs]
152
  st.success("βœ… Context retrieved successfully!")
153
-
 
154
  # ----------------- Run Individual Chains Explicitly -----------------
155
 
156
 
157
- --------------------
 
 
 
158
 
159
  # ----------------- Display All Outputs -----------------
160
  st.markdown("### Context Relevancy Evaluation")
 
147
  if query:
148
  with st.spinner("πŸ”„ Retrieving relevant context..."):
149
  retriever = st.session_state.vector_store.as_retriever(search_type="similarity", search_kwargs={"k": 5})
150
+ contexts = retriever.invoke(query)
151
+ context = [d.page_content for d in contexts]
152
  st.success("βœ… Context retrieved successfully!")
153
+ st.write(contexts, len(contexts))
154
+ st.write(context, len(context))
155
  # ----------------- Run Individual Chains Explicitly -----------------
156
 
157
 
158
+
159
+
160
+
161
+
162
 
163
  # ----------------- Display All Outputs -----------------
164
  st.markdown("### Context Relevancy Evaluation")