xiaosuhu1986 commited on
Commit
f2c88dd
·
1 Parent(s): c0d817f

update: app.py for local streamlit

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,13 +46,13 @@ user_input = st.text_input("You:", key="input")
46
  if st.button("Send"):
47
  if user_input:
48
  # Add user input to history
49
- st.session_state.messages.append(("User", user_input))
50
 
51
  # Run LangGraph chatbot
52
  state = DataState(messages=st.session_state.messages, data={}, finished=False)
53
  for output in graph_with_order_tools.stream(state):
54
  response = output["messages"][-1] # Get the last chatbot response
55
- st.session_state.messages.append(("Bot", response))
56
 
57
  # Display chat history
58
  for sender, message in st.session_state.messages:
 
46
  if st.button("Send"):
47
  if user_input:
48
  # Add user input to history
49
+ st.session_state.messages.append(("user", user_input))
50
 
51
  # Run LangGraph chatbot
52
  state = DataState(messages=st.session_state.messages, data={}, finished=False)
53
  for output in graph_with_order_tools.stream(state):
54
  response = output["messages"][-1] # Get the last chatbot response
55
+ st.session_state.messages.append(("ai", response))
56
 
57
  # Display chat history
58
  for sender, message in st.session_state.messages: