Update app.py
Browse files
app.py
CHANGED
@@ -293,13 +293,13 @@ def run_streamlit_app():
|
|
293 |
col1, col2, col3 = st.columns([1, 1, 3])
|
294 |
with col1:
|
295 |
if st.button("π", key=f"up_{chat_index}"):
|
296 |
-
if 'feedback'
|
297 |
chat['feedback'] = 1
|
298 |
st.session_state.chat_history[chat_index] = chat
|
299 |
update_google_sheets(chat['id'], feedback=1)
|
300 |
with col2:
|
301 |
if st.button("π", key=f"down_{chat_index}"):
|
302 |
-
if 'feedback'
|
303 |
chat['feedback'] = -1
|
304 |
st.session_state.chat_history[chat_index] = chat
|
305 |
update_google_sheets(chat['id'], feedback=-1)
|
|
|
293 |
col1, col2, col3 = st.columns([1, 1, 3])
|
294 |
with col1:
|
295 |
if st.button("π", key=f"up_{chat_index}"):
|
296 |
+
if chat['feedback'] == 0:
|
297 |
chat['feedback'] = 1
|
298 |
st.session_state.chat_history[chat_index] = chat
|
299 |
update_google_sheets(chat['id'], feedback=1)
|
300 |
with col2:
|
301 |
if st.button("π", key=f"down_{chat_index}"):
|
302 |
+
if chat['feedback'] == 0:
|
303 |
chat['feedback'] = -1
|
304 |
st.session_state.chat_history[chat_index] = chat
|
305 |
update_google_sheets(chat['id'], feedback=-1)
|