kaleidoskop-hug
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -64,8 +64,9 @@ st.sidebar.button('Reset Chat', on_click=reset_conversation) #Reset button
|
|
64 |
st.sidebar.write(f"You're now chatting with **{selected_model}**")
|
65 |
st.sidebar.markdown("*Generated content may be inaccurate or false.*")
|
66 |
|
67 |
-
|
68 |
-
|
|
|
69 |
|
70 |
st.subheader(f'{selected_model}')
|
71 |
|
@@ -73,17 +74,6 @@ st.subheader(f'{selected_model}')
|
|
73 |
if "messages" not in st.session_state:
|
74 |
st.session_state.messages = []
|
75 |
|
76 |
-
|
77 |
-
def remove_message(position):
|
78 |
-
st.toast("try to remove message no: " + str(position-1) + " and "+ str(position))
|
79 |
-
del st.session_state.messages[position-2:position]
|
80 |
-
|
81 |
-
if "remove" not in st.session_state:
|
82 |
-
st.session_state.remove= False
|
83 |
-
|
84 |
-
def remove_click():
|
85 |
-
st.session_state.remove= True
|
86 |
-
|
87 |
# Display chat messages from history on app rerun
|
88 |
pos = 0
|
89 |
for message in st.session_state.messages:
|
|
|
64 |
st.sidebar.write(f"You're now chatting with **{selected_model}**")
|
65 |
st.sidebar.markdown("*Generated content may be inaccurate or false.*")
|
66 |
|
67 |
+
def remove_message(position):
|
68 |
+
st.toast("try to remove message no: " + str(position-1) + " and "+ str(position))
|
69 |
+
del st.session_state.messages[position-2:position]
|
70 |
|
71 |
st.subheader(f'{selected_model}')
|
72 |
|
|
|
74 |
if "messages" not in st.session_state:
|
75 |
st.session_state.messages = []
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
# Display chat messages from history on app rerun
|
78 |
pos = 0
|
79 |
for message in st.session_state.messages:
|