Wajahat698 commited on
Commit
20bb4d5
·
verified ·
1 Parent(s): a7923fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -2019,13 +2019,14 @@ def handle_prompt(prompt):
2019
  st.markdown(formatted_text, unsafe_allow_html=False)
2020
 
2021
  update_message_usage(st.session_state.get("wix_user_id", "default_user"))
 
 
2022
 
2023
  except Exception as e:
2024
  logging.error(f"Error generating response: {e}")
2025
  st.error("An error occurred while generating the response. Please try again.")
2026
 
2027
- st.session_state.chat_history.append({"role": "assistant", "content": formatted_text})
2028
- copy_to_clipboard(cleaned_text)
2029
  st.session_state["handled"] = True # Mark as handled
2030
 
2031
 
 
2019
  st.markdown(formatted_text, unsafe_allow_html=False)
2020
 
2021
  update_message_usage(st.session_state.get("wix_user_id", "default_user"))
2022
+ st.session_state.chat_history.append({"role": "assistant", "content": formatted_text})
2023
+ copy_to_clipboard(cleaned_text)
2024
 
2025
  except Exception as e:
2026
  logging.error(f"Error generating response: {e}")
2027
  st.error("An error occurred while generating the response. Please try again.")
2028
 
2029
+
 
2030
  st.session_state["handled"] = True # Mark as handled
2031
 
2032