kaleidoskop-hug commited on
Commit
65f8770
·
verified ·
1 Parent(s): ee22b54

Update app.py

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