devve1 commited on
Commit
7eda63d
β€’
1 Parent(s): 80c65ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -451,12 +451,11 @@ if __name__ == '__main__':
451
  st.session_state.chat_id = 'New Chat'
452
 
453
  with st.sidebar:
454
- st.selectbox(
455
  label='Choose a conversation',
456
  options=[st.session_state.chat_id] + list(conversations.keys()) if st.session_state.chat_id not in conversations.keys() else list(conversations.keys()),
457
  index=0,
458
  placeholder='_',
459
- key='chat_id'
460
  )
461
  print(f'KEY SELECTBOX: {st.session_state.chat_id}')
462
 
@@ -516,7 +515,7 @@ if __name__ == '__main__':
516
  full_response = ""
517
  for chunk in re.split(r'(\s+)', ai_response):
518
  full_response += chunk + " "
519
- time.sleep(0.01)
520
  message_placeholder.write(full_response + 'β–Œ')
521
  message_placeholder.write(re.sub('β–Œ', '', full_response))
522
 
 
451
  st.session_state.chat_id = 'New Chat'
452
 
453
  with st.sidebar:
454
+ st.session_state.chat_id = st.selectbox(
455
  label='Choose a conversation',
456
  options=[st.session_state.chat_id] + list(conversations.keys()) if st.session_state.chat_id not in conversations.keys() else list(conversations.keys()),
457
  index=0,
458
  placeholder='_',
 
459
  )
460
  print(f'KEY SELECTBOX: {st.session_state.chat_id}')
461
 
 
515
  full_response = ""
516
  for chunk in re.split(r'(\s+)', ai_response):
517
  full_response += chunk + " "
518
+ time.sleep(0.02)
519
  message_placeholder.write(full_response + 'β–Œ')
520
  message_placeholder.write(re.sub('β–Œ', '', full_response))
521