Wajahat698 commited on
Commit
c1ecd7d
·
verified ·
1 Parent(s): 79bdd61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -366,7 +366,9 @@ for message in st.session_state.chat_history:
366
 
367
  # Chat input
368
  if not st.session_state.chat_active:
369
- st.markdown("""
 
 
370
  <script>
371
  document.addEventListener('DOMContentLoaded', (event) => {
372
  const svgs = document.querySelectorAll('svg');
@@ -461,7 +463,7 @@ if not st.session_state.chat_active:
461
  """, unsafe_allow_html=True)
462
 
463
  else:
464
- st.empty()
465
 
466
  def clean_text_for_markdown(text):
467
  # Ensure consistent spacing and remove any unwanted characters
 
366
 
367
  # Chat input
368
  if not st.session_state.chat_active:
369
+ content_placeholder = st.empty()
370
+
371
+ content_placeholder.markdown("""
372
  <script>
373
  document.addEventListener('DOMContentLoaded', (event) => {
374
  const svgs = document.querySelectorAll('svg');
 
463
  """, unsafe_allow_html=True)
464
 
465
  else:
466
+ content_placeholder.empty()
467
 
468
  def clean_text_for_markdown(text):
469
  # Ensure consistent spacing and remove any unwanted characters