ageraustine commited on
Commit
f6568b9
1 Parent(s): e9ac9a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -101,9 +101,9 @@ clear_button = st.sidebar.button("Clear Conversation", key="clear")
101
 
102
  # Initialise session state variables
103
  if 'generated' not in st.session_state:
104
- st.session_state['generated'] = [{"role": "assistant", "content": "Please tell me about your most recent profession"}]
105
  if 'past' not in st.session_state:
106
- st.session_state['past'] = [{"role": "assistant", "content": "Please tell me about your most recent profession"}]
107
  if 'messages' not in st.session_state:
108
  st.session_state['messages'] = []
109
 
@@ -140,6 +140,7 @@ with container:
140
 
141
  if st.session_state['generated']:
142
  with response_container:
 
143
  for i in range(len(st.session_state['generated'])):
144
  message(st.session_state["past"][i], is_user=True, key=str(i) + '_user')
145
  message(st.session_state["generated"][i], key=str(i))
 
101
 
102
  # Initialise session state variables
103
  if 'generated' not in st.session_state:
104
+ st.session_state['generated'] = []
105
  if 'past' not in st.session_state:
106
+ st.session_state['past'] = []
107
  if 'messages' not in st.session_state:
108
  st.session_state['messages'] = []
109
 
 
140
 
141
  if st.session_state['generated']:
142
  with response_container:
143
+ message("Please tell me about your most recent career")
144
  for i in range(len(st.session_state['generated'])):
145
  message(st.session_state["past"][i], is_user=True, key=str(i) + '_user')
146
  message(st.session_state["generated"][i], key=str(i))