diff options
author | t.me/xtekky <98614666+xtekky@users.noreply.github.com> | 2023-04-29 02:12:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 02:12:29 +0200 |
commit | 55217bb6289a13793284eded7b60e0b9de589f69 (patch) | |
tree | 91d6f5fa2cf206a1625b11b0684e48f086d131c1 /gui/streamlit_chat_app.py | |
parent | Update streamlit_app.py (diff) | |
parent | Update streamlit_chat_app.py (diff) | |
download | gpt4free-55217bb6289a13793284eded7b60e0b9de589f69.tar gpt4free-55217bb6289a13793284eded7b60e0b9de589f69.tar.gz gpt4free-55217bb6289a13793284eded7b60e0b9de589f69.tar.bz2 gpt4free-55217bb6289a13793284eded7b60e0b9de589f69.tar.lz gpt4free-55217bb6289a13793284eded7b60e0b9de589f69.tar.xz gpt4free-55217bb6289a13793284eded7b60e0b9de589f69.tar.zst gpt4free-55217bb6289a13793284eded7b60e0b9de589f69.zip |
Diffstat (limited to 'gui/streamlit_chat_app.py')
-rw-r--r-- | gui/streamlit_chat_app.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/streamlit_chat_app.py b/gui/streamlit_chat_app.py index dce8ef29..1c0dd92a 100644 --- a/gui/streamlit_chat_app.py +++ b/gui/streamlit_chat_app.py @@ -76,9 +76,10 @@ submit_button = st.button("Submit") if user_input or submit_button: output = query(user_input, st.session_state['query_method']) + escaped_output = output.encode('utf-8').decode('unicode-escape') st.session_state.current_conversation['user_inputs'].append(user_input) - st.session_state.current_conversation['generated_responses'].append(output) + st.session_state.current_conversation['generated_responses'].append(escaped_output) save_conversations(st.session_state.conversations, st.session_state.current_conversation) user_input = input_placeholder.text_input('You:', value='', key=f'input_text_{len(st.session_state["current_conversation"]["user_inputs"])}') # Clear the input field |