Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,6 +29,16 @@ if 'workspace_projects' not in st.session_state:
|
|
| 29 |
if 'available_agents' not in st.session_state:
|
| 30 |
st.session_state.available_agents = []
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
# AI Guide Toggle
|
| 33 |
ai_guide_level = st.sidebar.radio("AI Guide Level", ["Full Assistance", "Partial Assistance", "No Assistance"])
|
| 34 |
|
|
|
|
| 29 |
if 'available_agents' not in st.session_state:
|
| 30 |
st.session_state.available_agents = []
|
| 31 |
|
| 32 |
+
# Initialize the session state variable as an empty string
|
| 33 |
+
st.session_state.user_input = ""
|
| 34 |
+
|
| 35 |
+
# Create the text input widget
|
| 36 |
+
user_input = st.text_input("Enter your text:", "Initial text")
|
| 37 |
+
|
| 38 |
+
# Use the get() method to get the current value of the widget and update it
|
| 39 |
+
if st.button("Update"):
|
| 40 |
+
st.session_state.user_input = user_input
|
| 41 |
+
|
| 42 |
# AI Guide Toggle
|
| 43 |
ai_guide_level = st.sidebar.radio("AI Guide Level", ["Full Assistance", "Partial Assistance", "No Assistance"])
|
| 44 |
|