Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
-
"""
|
5 |
-
Developed by Hashir Ehtisham
|
6 |
-
"""
|
7 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
8 |
|
9 |
def respond(
|
@@ -56,6 +53,7 @@ def send_message():
|
|
56 |
# Streamlit UI
|
57 |
st.title("Emotional Support Chatbot")
|
58 |
st.write("Hello! I'm here to support you emotionally and answer any questions. How are you feeling today?")
|
|
|
59 |
|
60 |
system_message = st.text_input("System message", value="You are a friendly Emotional Support Chatbot.", key="system_message")
|
61 |
|
@@ -72,6 +70,6 @@ if 'history' not in st.session_state:
|
|
72 |
st.session_state.history = []
|
73 |
|
74 |
# Display chat history above the message input
|
75 |
-
st.text_area("Chat History", value="\n".join([f"User: {h[0]}\nBot: {h[1]}" for h in st.session_state.history]), height=400, key="chat_history")
|
76 |
|
77 |
message = st.text_input("Your message", key="new_message", on_change=send_message)
|
|
|
1 |
import streamlit as st
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
|
|
|
|
|
|
4 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
5 |
|
6 |
def respond(
|
|
|
53 |
# Streamlit UI
|
54 |
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("System message", value="You are a friendly Emotional Support Chatbot.", key="system_message")
|
59 |
|
|
|
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)
|