M17idd commited on
Commit
6099397
·
verified ·
1 Parent(s): 0b92da2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -627,9 +627,16 @@ if query:
627
  ])
628
  rewritten = clean_text(response.content.strip())
629
 
630
- st.markdown(f'<div class="chat-message">{rewritten}</div>', unsafe_allow_html=True)
 
 
 
631
  think.empty()
632
 
633
  else:
634
  st.warning("هیچ خط مرتبطی پیدا نشد.")
635
- think.empty()
 
 
 
 
 
627
  ])
628
  rewritten = clean_text(response.content.strip())
629
 
630
+ # ذخیره پیام‌های چت
631
+ st.session_state.chat_history.append(("🧑", query))
632
+ st.session_state.chat_history.append(("🤖", rewritten))
633
+
634
  think.empty()
635
 
636
  else:
637
  st.warning("هیچ خط مرتبطی پیدا نشد.")
638
+ think.empty()
639
+
640
+ # نمایش تاریخچه گفتگو
641
+ for sender, msg in st.session_state.chat_history:
642
+ st.markdown(f"{sender} {msg}")