kaleidoskop-hug commited on
Commit
b91ffe4
·
verified ·
1 Parent(s): 5e32990

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -75,7 +75,8 @@ def get_assistant_aswer(st_model, st_messages, st_temp_value, st_max_tokens):
75
  return response
76
 
77
  def retry_last():
78
- response = get_assistant_aswer(model_links[selected_model], st.session_state.messages[:-1], temp_values, max_token_value)
 
79
  with st.chat_message("assistant"):
80
  st.write(response)
81
  st.button("retry", on_click=retry_last())
 
75
  return response
76
 
77
  def retry_last():
78
+ st.session_state.messages.pop()
79
+ response = get_assistant_aswer(model_links[selected_model], st.session_state.messages, temp_values, max_token_value)
80
  with st.chat_message("assistant"):
81
  st.write(response)
82
  st.button("retry", on_click=retry_last())