Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,16 +67,14 @@ if prompt :
|
|
| 67 |
st.session_state.run_id = cb.traced_runs[0].id
|
| 68 |
message_placeholder.markdown(full_response)
|
| 69 |
if used_docs:
|
| 70 |
-
for i, doc in enumerate(used_docs)
|
| 71 |
-
print(f"Doc {i + 1} metadata: {doc.metadata}") # Debugging step
|
| 72 |
-
print(f"Content: {doc.page_content}")
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
with st.sidebar:
|
| 77 |
st.download_button(
|
| 78 |
label="Consulted Documents",
|
| 79 |
-
data=
|
| 80 |
file_name="Consulted_documents.txt",
|
| 81 |
mime="text/plain",
|
| 82 |
)
|
|
|
|
| 67 |
st.session_state.run_id = cb.traced_runs[0].id
|
| 68 |
message_placeholder.markdown(full_response)
|
| 69 |
if used_docs:
|
| 70 |
+
docs_content = "\n\n".join(f"Doc {i + 1}:\n{doc.page_content}\nMetadata: {doc.metadata}" for i, doc in enumerate(used_docs)
|
|
|
|
|
|
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
with st.sidebar:
|
| 75 |
st.download_button(
|
| 76 |
label="Consulted Documents",
|
| 77 |
+
data=docs_content ,# docs_content,
|
| 78 |
file_name="Consulted_documents.txt",
|
| 79 |
mime="text/plain",
|
| 80 |
)
|