Update app.py
Browse files
app.py
CHANGED
|
@@ -9,10 +9,10 @@ from langchain.schema import HumanMessage, SystemMessage, AIMessage
|
|
| 9 |
warnings.filterwarnings("ignore")
|
| 10 |
|
| 11 |
# Streamlit settings
|
| 12 |
-
st.set_page_config(page_title="
|
| 13 |
|
| 14 |
# Header
|
| 15 |
-
st.markdown("<h1 style='text-align: center; color: #4B0082;'>Welcome to
|
| 16 |
st.markdown("<h3 style='color: #003366;'>How can I assist with your ailments or worries today? π§ͺπ«</h3>", unsafe_allow_html=True)
|
| 17 |
|
| 18 |
# Initialize session state for messages
|
|
@@ -35,14 +35,15 @@ llm = ChatGoogleGenerativeAI(
|
|
| 35 |
def chat_bubble(message, is_user=True):
|
| 36 |
align = 'right' if is_user else 'left'
|
| 37 |
color = '#E1F5FE' if is_user else '#FFEBEE'
|
| 38 |
-
|
| 39 |
<div style="text-align: {align}; padding: 10px;">
|
| 40 |
<span style="display: inline-block; padding: 10px; background-color: {color}; color: black;
|
| 41 |
border-radius: 15px; max-width: 70%; word-wrap: break-word;">
|
| 42 |
{message}
|
| 43 |
</span>
|
| 44 |
</div>
|
| 45 |
-
"""
|
|
|
|
| 46 |
|
| 47 |
# Function to load answer from the model
|
| 48 |
def load_answer(question):
|
|
|
|
| 9 |
warnings.filterwarnings("ignore")
|
| 10 |
|
| 11 |
# Streamlit settings
|
| 12 |
+
st.set_page_config(page_title="πΏ ArchanaCare π§ββοΈ", page_icon="π§ββοΈ", layout="wide")
|
| 13 |
|
| 14 |
# Header
|
| 15 |
+
st.markdown("<h1 style='text-align: center; color: #4B0082;'>Welcome to ArchanaCare πΏβ¨</h1>", unsafe_allow_html=True)
|
| 16 |
st.markdown("<h3 style='color: #003366;'>How can I assist with your ailments or worries today? π§ͺπ«</h3>", unsafe_allow_html=True)
|
| 17 |
|
| 18 |
# Initialize session state for messages
|
|
|
|
| 35 |
def chat_bubble(message, is_user=True):
|
| 36 |
align = 'right' if is_user else 'left'
|
| 37 |
color = '#E1F5FE' if is_user else '#FFEBEE'
|
| 38 |
+
bubble_style = f"""
|
| 39 |
<div style="text-align: {align}; padding: 10px;">
|
| 40 |
<span style="display: inline-block; padding: 10px; background-color: {color}; color: black;
|
| 41 |
border-radius: 15px; max-width: 70%; word-wrap: break-word;">
|
| 42 |
{message}
|
| 43 |
</span>
|
| 44 |
</div>
|
| 45 |
+
"""
|
| 46 |
+
st.markdown(bubble_style, unsafe_allow_html=True)
|
| 47 |
|
| 48 |
# Function to load answer from the model
|
| 49 |
def load_answer(question):
|