vsouza commited on
Commit
a6a7eef
·
1 Parent(s): d8bd7a0

remove unused state var

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -17,8 +17,6 @@ cookie_manager = get_manager()
17
 
18
  st.session_state.thread_id = cookie_manager.get('thread_id')
19
 
20
- if "start_chat" not in st.session_state:
21
- st.session_state.start_chat = False
22
  if "session_id" not in st.session_state:
23
  st.session_state.session_id = str(uuid.uuid4())
24
  if "messages" not in st.session_state:
@@ -34,7 +32,6 @@ with st.sidebar:
34
  c1, c2 = st.columns(2)
35
 
36
  if c1.button("Start Chat", use_container_width=True):
37
- st.session_state.start_chat = True
38
  if thread_id:
39
  st.session_state.thread_id = thread_id
40
  else:
@@ -47,9 +44,8 @@ with st.sidebar:
47
  cookie_manager.set('thread_id', st.session_state.thread_id)
48
 
49
  if c2.button("Clear Chat", use_container_width=True):
50
- st.session_state.start_chat = False
51
- st.session_state.thread_id = None
52
  cookie_manager.delete('thread_id')
 
53
 
54
  #def process_citations(message):
55
  # message_content = message.content[0].text
 
17
 
18
  st.session_state.thread_id = cookie_manager.get('thread_id')
19
 
 
 
20
  if "session_id" not in st.session_state:
21
  st.session_state.session_id = str(uuid.uuid4())
22
  if "messages" not in st.session_state:
 
32
  c1, c2 = st.columns(2)
33
 
34
  if c1.button("Start Chat", use_container_width=True):
 
35
  if thread_id:
36
  st.session_state.thread_id = thread_id
37
  else:
 
44
  cookie_manager.set('thread_id', st.session_state.thread_id)
45
 
46
  if c2.button("Clear Chat", use_container_width=True):
 
 
47
  cookie_manager.delete('thread_id')
48
+ st.session_state.thread_id = None
49
 
50
  #def process_citations(message):
51
  # message_content = message.content[0].text