Update app.py
Browse files
app.py
CHANGED
@@ -329,6 +329,7 @@ def main():
|
|
329 |
|
330 |
# Clear history
|
331 |
if clear_history:
|
|
|
332 |
st.session_state.chat_history = []
|
333 |
save_qa_history([]) # Clear saved history
|
334 |
st.rerun()
|
@@ -372,12 +373,6 @@ def main():
|
|
372 |
"🟢" if st.session_state.pipeline else "🔴",
|
373 |
"พร้อมใช้งาน" if st.session_state.pipeline else "ไม่พร้อมใช้งาน"
|
374 |
), unsafe_allow_html=True)
|
375 |
-
|
376 |
-
# Handle clear history action
|
377 |
-
if clear_history:
|
378 |
-
st.session_state.chat_history = []
|
379 |
-
clear_qa_history()
|
380 |
-
st.rerun()
|
381 |
|
382 |
time.sleep(20)
|
383 |
save_qa_history(all_history)
|
|
|
329 |
|
330 |
# Clear history
|
331 |
if clear_history:
|
332 |
+
time.sleep(20)
|
333 |
st.session_state.chat_history = []
|
334 |
save_qa_history([]) # Clear saved history
|
335 |
st.rerun()
|
|
|
373 |
"🟢" if st.session_state.pipeline else "🔴",
|
374 |
"พร้อมใช้งาน" if st.session_state.pipeline else "ไม่พร้อมใช้งาน"
|
375 |
), unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
|
377 |
time.sleep(20)
|
378 |
save_qa_history(all_history)
|