Chris4K commited on
Commit
3896508
·
verified ·
1 Parent(s): b2b25fd

Update app_chat.py

Browse files
Files changed (1) hide show
  1. app_chat.py +5 -4
app_chat.py CHANGED
@@ -30,13 +30,14 @@ def app_chat(agent_config):
30
  # Chat code (user input, agent responses, etc.)
31
  if "messages" not in st.session_state:
32
  st.session_state.messages = []
33
-
 
34
  for message in st.session_state.messages:
35
  with st.chat_message(message["role"]):
36
  st.markdown(message["content"])
37
 
38
- with st.chat_message("assistant"):
39
- st.markdown("Hello there! How can I assist you today?")
40
 
41
  if user_message := st.chat_input("Enter message"):
42
  st.chat_message("user").markdown(user_message)
@@ -52,7 +53,7 @@ def app_chat(agent_config):
52
  if response is None:
53
  chat_respone = handle_submission_chat(user_message, response)
54
  st.write(chat_respone)
55
- st.warning("The agent's response is None. Please try again. Generate an image of a flying horse.")
56
  elif isinstance(response, Image.Image):
57
  st.image(response)
58
  elif isinstance(response, AudioSegment):
 
30
  # Chat code (user input, agent responses, etc.)
31
  if "messages" not in st.session_state:
32
  st.session_state.messages = []
33
+ st.markdown("Hello there! How can I assist you today?")
34
+
35
  for message in st.session_state.messages:
36
  with st.chat_message(message["role"]):
37
  st.markdown(message["content"])
38
 
39
+ #with st.chat_message("assistant"):
40
+ # st.markdown("Hello there! How can I assist you today?")
41
 
42
  if user_message := st.chat_input("Enter message"):
43
  st.chat_message("user").markdown(user_message)
 
53
  if response is None:
54
  chat_respone = handle_submission_chat(user_message, response)
55
  st.write(chat_respone)
56
+ # st.warning("The agent's response is None. Please try again. Generate an image of a flying uncormn.")
57
  elif isinstance(response, Image.Image):
58
  st.image(response)
59
  elif isinstance(response, AudioSegment):