Vlad Bastina commited on
Commit
d681a96
·
1 Parent(s): 22c5be7

default changes

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -60,6 +60,9 @@ if __name__ == "__main__":
60
  # Autofill the selected question into the text input
61
  question = st.text_input("Ask a question about the document:", value=selected_question)
62
 
 
 
 
63
  # Handle user question and AI response
64
  if st.button("Ask AI") and question:
65
  st.session_state.messages.append({"role": "user", "content": question})
 
60
  # Autofill the selected question into the text input
61
  question = st.text_input("Ask a question about the document:", value=selected_question)
62
 
63
+ if "messages" not in st.session_state:
64
+ st.session_state.messages = []
65
+
66
  # Handle user question and AI response
67
  if st.button("Ask AI") and question:
68
  st.session_state.messages.append({"role": "user", "content": question})