kamau1 commited on
Commit
3691805
·
verified ·
1 Parent(s): 0c777e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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(pdf_docs)
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})