Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ st.title("Emotional Support Chatbot")
|
|
55 |
st.write("Hello! I'm here to support you emotionally and answer any questions. How are you feeling today?")
|
56 |
st.markdown("<p style='color:green;'>Developed by Hashir Ehtisham</p>", unsafe_allow_html=True)
|
57 |
|
58 |
-
system_message = st.text_input("
|
59 |
|
60 |
with st.expander("Settings"):
|
61 |
max_tokens_options = [64, 128, 256, 512, 1024, 2048]
|
@@ -70,7 +70,6 @@ if 'history' not in st.session_state:
|
|
70 |
st.session_state.history = []
|
71 |
|
72 |
# Display chat history above the message input
|
73 |
-
|
74 |
-
st.text_area("Chat History", value=chat_history, height=400, key="chat_history")
|
75 |
|
76 |
message = st.text_input("Your message", key="new_message", on_change=send_message)
|
|
|
55 |
st.write("Hello! I'm here to support you emotionally and answer any questions. How are you feeling today?")
|
56 |
st.markdown("<p style='color:green;'>Developed by Hashir Ehtisham</p>", unsafe_allow_html=True)
|
57 |
|
58 |
+
system_message = st.text_input("System message", value="You are a friendly Emotional Support Chatbot.", key="system_message")
|
59 |
|
60 |
with st.expander("Settings"):
|
61 |
max_tokens_options = [64, 128, 256, 512, 1024, 2048]
|
|
|
70 |
st.session_state.history = []
|
71 |
|
72 |
# Display chat history above the message input
|
73 |
+
st.text_area("Chat History", value="\n\n".join([f"User: {h[0]}\n\nBot: {h[1]}" for h in st.session_state.history]), height=400, key="chat_history")
|
|
|
74 |
|
75 |
message = st.text_input("Your message", key="new_message", on_change=send_message)
|