Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -463,10 +463,11 @@ def main():
|
|
463 |
print(f"DEBUG - user_input : {user_input} and len(st.session_state.uploaded_files) is {len(st.session_state.uploaded_files)}")
|
464 |
|
465 |
if user_input or st.session_state.awaiting_image_upload or len(st.session_state.uploaded_files) > 0:
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
st.
|
|
|
470 |
|
471 |
# Process response
|
472 |
print(f"DEBUG - Calling process_response with user_input : {user_input}")
|
|
|
463 |
print(f"DEBUG - user_input : {user_input} and len(st.session_state.uploaded_files) is {len(st.session_state.uploaded_files)}")
|
464 |
|
465 |
if user_input or st.session_state.awaiting_image_upload or len(st.session_state.uploaded_files) > 0:
|
466 |
+
if user_input:
|
467 |
+
# Add user message to chat
|
468 |
+
st.session_state.messages.append({"role": "user", "content": user_input})
|
469 |
+
with st.chat_message("user"):
|
470 |
+
st.markdown(user_input)
|
471 |
|
472 |
# Process response
|
473 |
print(f"DEBUG - Calling process_response with user_input : {user_input}")
|