kaleidoskop-hug commited on
Commit
99d07ac
·
verified ·
1 Parent(s): 63d6f6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -87,7 +87,7 @@ for message in st.session_state.messages:
87
  col1.markdown(message["content"])
88
  col2.button("edit-"+str(pos), key="button_edit_message_"+str(pos), args=[pos], on_click=edit_message)
89
  if message["role"] == "assistant":
90
- col2.button(str(pos), icon = ":material/thumb_up", key="button_remove_message_"+str(pos), args=[pos], on_click=remove_message)
91
 
92
  # Accept user input
93
  if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
@@ -107,11 +107,11 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
107
  col1, col2 = st.columns([9,1])
108
  response = col1.write_stream(assistant["stream"])
109
  col2.button("edit-"+str(pos), key="button_edit_message_"+str(pos), args=[pos], on_click=edit_message)
110
- col2.button(str(pos), icon = ":material/thumb_up", key="button_remove_message_"+str(pos), args=[pos], on_click=remove_message)
111
  else:
112
  with st.chat_message("assistant"):
113
  col1, col2 = st.columns([9,1])
114
  response = col1.write("Failure!")
115
- col2.button(str(pos), icon = ":material/thumb_up", key="button_remove_message_"+str(pos), args=[pos], on_click=remove_message)
116
 
117
  st.session_state.messages.append({"role": "assistant", "content": response})
 
87
  col1.markdown(message["content"])
88
  col2.button("edit-"+str(pos), key="button_edit_message_"+str(pos), args=[pos], on_click=edit_message)
89
  if message["role"] == "assistant":
90
+ col2.button(str(pos), icon = ":material/delete:", key="button_remove_message_"+str(pos), args=[pos], on_click=remove_message)
91
 
92
  # Accept user input
93
  if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
 
107
  col1, col2 = st.columns([9,1])
108
  response = col1.write_stream(assistant["stream"])
109
  col2.button("edit-"+str(pos), key="button_edit_message_"+str(pos), args=[pos], on_click=edit_message)
110
+ col2.button(str(pos), icon = ":material/delete:", key="button_remove_message_"+str(pos), args=[pos], on_click=remove_message)
111
  else:
112
  with st.chat_message("assistant"):
113
  col1, col2 = st.columns([9,1])
114
  response = col1.write("Failure!")
115
+ col2.button(str(pos), icon = ":material/delete:", key="button_remove_message_"+str(pos), args=[pos], on_click=remove_message)
116
 
117
  st.session_state.messages.append({"role": "assistant", "content": response})