Spaces:
Runtime error
Runtime error
Boardpac/theekshanas
commited on
Commit
•
9e2dc86
1
Parent(s):
6ae91a0
show sources only for retrieval questions
Browse files- __pycache__/qaPipeline.cpython-311.pyc +0 -0
- 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 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
st.
|
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 |
|