kaleidoskop-hug commited on
Commit
d8e5078
·
verified ·
1 Parent(s): a42067e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -112,7 +112,7 @@ if st.session_state.remove:
112
  # Accept user input
113
  if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
114
  # Display user message in chat message container and Add user message to chat history
115
- pos = st.session_state.messages.length
116
  with st.chat_message("user"):
117
  col1, col2 = st.columns([9,1])
118
  col1.markdown(prompt)
@@ -121,7 +121,7 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
121
 
122
  # Display assistant response in chat message container
123
  assistant = ask_assistant_stream(model_links[selected_model], st.session_state.messages, temp_values, max_token_value)
124
- pos = st.session_state.messages.length
125
  if "stream" in assistant:
126
  with st.chat_message("assistant"):
127
  col1, col2 = st.columns([9,1])
 
112
  # Accept user input
113
  if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
114
  # Display user message in chat message container and Add user message to chat history
115
+ pos = len(st.session_state.messages)
116
  with st.chat_message("user"):
117
  col1, col2 = st.columns([9,1])
118
  col1.markdown(prompt)
 
121
 
122
  # Display assistant response in chat message container
123
  assistant = ask_assistant_stream(model_links[selected_model], st.session_state.messages, temp_values, max_token_value)
124
+ pos = len(st.session_state.messages)
125
  if "stream" in assistant:
126
  with st.chat_message("assistant"):
127
  col1, col2 = st.columns([9,1])