Hugo Garcia-Cotte commited on
Commit
8e2e4ad
1 Parent(s): 52586cd

banging my head on Streamlit

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,6 +15,7 @@ child = st.session_state['child']
15
  # creating a single-element container
16
  placeholder = st.empty()
17
 
 
18
  user_input = st.text_input("Enter your message here:")
19
 
20
  while True:
@@ -31,10 +32,9 @@ while True:
31
  if line is not None: st.session_state['messages'].append(line)
32
 
33
  if user_input :
34
- st.session_state['messages'].append(str(user_input))
35
  child.sendline(str(user_input))
36
  user_input=""
37
- time.sleep(5)
38
 
39
 
40
 
 
15
  # creating a single-element container
16
  placeholder = st.empty()
17
 
18
+ user_input = st.empty()
19
  user_input = st.text_input("Enter your message here:")
20
 
21
  while True:
 
32
  if line is not None: st.session_state['messages'].append(line)
33
 
34
  if user_input :
 
35
  child.sendline(str(user_input))
36
  user_input=""
37
+ time.sleep(0.5)
38
 
39
 
40