Update app.py
Browse files
app.py
CHANGED
|
@@ -223,7 +223,8 @@ display_conversation()
|
|
| 223 |
|
| 224 |
# --- Chat Input Form ---
|
| 225 |
with st.form("chat_form", clear_on_submit=True):
|
| 226 |
-
|
|
|
|
| 227 |
submitted = st.form_submit_button("Send")
|
| 228 |
if submitted and user_input:
|
| 229 |
st.session_state.chat_history.append(("user", user_input))
|
|
@@ -250,4 +251,4 @@ if st.session_state.chat_history and st.session_state.chat_history[-1][0] == "us
|
|
| 250 |
|
| 251 |
# Append the complete assistant response to the chat history.
|
| 252 |
st.session_state.chat_history.append(("assistant", assistant_message))
|
| 253 |
-
st.experimental_rerun()
|
|
|
|
| 223 |
|
| 224 |
# --- Chat Input Form ---
|
| 225 |
with st.form("chat_form", clear_on_submit=True):
|
| 226 |
+
# Use st.text_area for multi-line text input with text wrapping
|
| 227 |
+
user_input = st.text_area("Enter your message:", height=150)
|
| 228 |
submitted = st.form_submit_button("Send")
|
| 229 |
if submitted and user_input:
|
| 230 |
st.session_state.chat_history.append(("user", user_input))
|
|
|
|
| 251 |
|
| 252 |
# Append the complete assistant response to the chat history.
|
| 253 |
st.session_state.chat_history.append(("assistant", assistant_message))
|
| 254 |
+
st.experimental_rerun()
|