Update app.py
Browse files
app.py
CHANGED
@@ -101,7 +101,7 @@ def main():
|
|
101 |
with st.spinner("Processing"):
|
102 |
# get pdf text
|
103 |
if pdf is not None:
|
104 |
-
raw_text = get_pdf_text(
|
105 |
|
106 |
# get the text chunks
|
107 |
text_chunks = get_text_chunks(raw_text)
|
@@ -127,6 +127,7 @@ def main():
|
|
127 |
st.markdown(user_question)
|
128 |
st.session_state.messages.append({"role": "user", "content": user_question})
|
129 |
response = st.session_state.conversation({"question": user_question})
|
|
|
130 |
with st.chat_message("assistant"):
|
131 |
st.markdown(response)
|
132 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
|
|
101 |
with st.spinner("Processing"):
|
102 |
# get pdf text
|
103 |
if pdf is not None:
|
104 |
+
raw_text = get_pdf_text(pdf)
|
105 |
|
106 |
# get the text chunks
|
107 |
text_chunks = get_text_chunks(raw_text)
|
|
|
127 |
st.markdown(user_question)
|
128 |
st.session_state.messages.append({"role": "user", "content": user_question})
|
129 |
response = st.session_state.conversation({"question": user_question})
|
130 |
+
st.session_state.chat_history = response["chat_history"]
|
131 |
with st.chat_message("assistant"):
|
132 |
st.markdown(response)
|
133 |
st.session_state.messages.append({"role": "assistant", "content": response})
|