Spaces:
Runtime error
Runtime error
Fix the user_input problem
#1
by Youssefk - opened
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 |
-
|
|
|
|
|
|
|
|
|
|
| 23 |
if user_input :
|
| 24 |
-
child.sendline(str(
|
| 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:
|