Hugo Garcia-Cotte commited on
Commit
3c0a606
1 Parent(s): bc06ca5

modified UI

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -19,9 +19,17 @@ st.write("version : alpha 0.0.1")
19
  # creating a single-element container
20
  placeholder = st.empty()
21
 
22
- user_input = st.text_input("What do you do or say ?")
 
 
 
 
 
 
 
 
23
  if user_input :
24
- child.sendline(str(user_input))
25
  user_input=""
26
 
27
  while True:
 
19
  # creating a single-element container
20
  placeholder = st.empty()
21
 
22
+ if "text" not in st.session_state:
23
+ st.session_state["text"] = ""
24
+ if "saved_text" not in st.session_state:
25
+ st.session_state["saved_text"] = ""
26
+
27
+ st.session_state["saved_text"] = st.session_state["text"]
28
+ st.session_state["text"] = ""
29
+
30
+ user_input = st.text_input("What do you do or say ?",key = "text")
31
  if user_input :
32
+ child.sendline(str(st.session_state["saved_text"]))
33
  user_input=""
34
 
35
  while True: