Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -220,10 +220,13 @@ def create_conversation_chain(vectorstore):
|
|
220 |
def process_user_input(user_question):
|
221 |
response = st.session_state.conversation({'question': user_question})
|
222 |
st.session_state.chat_history = response['chat_history']
|
223 |
-
|
224 |
for i, message in enumerate(st.session_state.chat_history):
|
225 |
template = user_template if i % 2 == 0 else bot_template
|
226 |
st.write(template.replace("{{MSG}}", message.content), unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
227 |
|
228 |
def main():
|
229 |
# Sidebar and global
|
|
|
220 |
def process_user_input(user_question):
|
221 |
response = st.session_state.conversation({'question': user_question})
|
222 |
st.session_state.chat_history = response['chat_history']
|
|
|
223 |
for i, message in enumerate(st.session_state.chat_history):
|
224 |
template = user_template if i % 2 == 0 else bot_template
|
225 |
st.write(template.replace("{{MSG}}", message.content), unsafe_allow_html=True)
|
226 |
+
# Save file output from PDF query results
|
227 |
+
filename = generate_filename(user_question, 'txt')
|
228 |
+
create_file(filename, user_question, message.content)
|
229 |
+
st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
230 |
|
231 |
def main():
|
232 |
# Sidebar and global
|