Taiko3615 Youssefk commited on
Commit
bf680d3
1 Parent(s): bc06ca5

Fix the user_input problem (#1)

Browse files

- Fix the user_input problem (a01d81368016030feb90ebc18e516c17f3e24da2)


Co-authored-by: Youssef Khemiri <Youssefk@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -19,9 +19,12 @@ 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
+ st.session_state["saved_text"] = st.session_state["text"]
23
+ st.session_state["text"] = ""
24
+
25
+ user_input = st.text_input("What do you do or say ?",key = "text")
26
  if user_input :
27
+ child.sendline(str(st.session_state["saved_text"]))
28
  user_input=""
29
 
30
  while True: