Boardpac/theekshanas commited on
Commit
9e2dc86
1 Parent(s): 6ae91a0

show sources only for retrieval questions

Browse files
Files changed (2) hide show
  1. __pycache__/qaPipeline.cpython-311.pyc +0 -0
  2. app.py +8 -6
__pycache__/qaPipeline.cpython-311.pyc CHANGED
Binary files a/__pycache__/qaPipeline.cpython-311.pyc and b/__pycache__/qaPipeline.cpython-311.pyc differ
 
app.py CHANGED
@@ -179,12 +179,14 @@ def show_query_response(query, response, show_source_files):
179
  if show_source_files:
180
  # st.write(source_template.replace(
181
  # "{{MSG}}", "source files" ), unsafe_allow_html=True)
182
- st.markdown("#### source files : ")
183
- for source in docs:
184
- # st.info(source.metadata)
185
- with st.expander(source.metadata["source"]):
186
- st.markdown(source.page_content)
187
-
 
 
188
  # st.write(response)
189
 
190
 
 
179
  if show_source_files:
180
  # st.write(source_template.replace(
181
  # "{{MSG}}", "source files" ), unsafe_allow_html=True)
182
+
183
+ if len(docs)>0 :
184
+ st.markdown("#### source files : ")
185
+ for source in docs:
186
+ # st.info(source.metadata)
187
+ with st.expander(source.metadata["source"]):
188
+ st.markdown(source.page_content)
189
+
190
  # st.write(response)
191
 
192