Spaces:
Sleeping
Sleeping
Text box bug
Browse files- src/streamlit_app.py +3 -5
src/streamlit_app.py
CHANGED
|
@@ -195,13 +195,11 @@ predefined_options = L["predefined"]
|
|
| 195 |
# Dropdown for predefined options
|
| 196 |
selected_option = st.selectbox(L["select_label"], predefined_options)
|
| 197 |
|
| 198 |
-
# Text area for input
|
| 199 |
if selected_option == L["new_question"]:
|
| 200 |
-
user_input = st.text_area(
|
| 201 |
-
L["text_label"], height=100, key="user_input", placeholder=L["placeholder"]
|
| 202 |
-
)
|
| 203 |
else:
|
| 204 |
-
user_input = st.text_area(L["text_label"], height=100,
|
| 205 |
|
| 206 |
# Buttons layout: Reset | Language Toggle | Send
|
| 207 |
col_left, col_mid, col_right = st.columns([4, 2, 4])
|
|
|
|
| 195 |
# Dropdown for predefined options
|
| 196 |
selected_option = st.selectbox(L["select_label"], predefined_options)
|
| 197 |
|
| 198 |
+
# Text area for input - use the selected option as the default value
|
| 199 |
if selected_option == L["new_question"]:
|
| 200 |
+
user_input = st.text_area(L["text_label"], height=100, placeholder=L["placeholder"])
|
|
|
|
|
|
|
| 201 |
else:
|
| 202 |
+
user_input = st.text_area(L["text_label"], height=100, value=selected_option)
|
| 203 |
|
| 204 |
# Buttons layout: Reset | Language Toggle | Send
|
| 205 |
col_left, col_mid, col_right = st.columns([4, 2, 4])
|