ctet_bank / app.py
jaothan's picture
Update app.py
57f8884 verified
# app.py
import streamlit as st
#from chatbot_backend import Chatbot
# Initialize the chatbot
#chatbot = Chatbot()
# Load documents (you should replace this with actual document loading logic)
# chatbot.load_documents(your_documents)
# Set page title and layout
st.set_page_config(page_title="Pictet Knowledge Chat", layout="wide")
# Sidebar
with st.sidebar:
st.image("https://via.placeholder.com/50x50", width=50) # Replace with actual logo
st.title("PICTET")
st.header("Chats")
# New Chat button
if st.button("New Chat", use_container_width=True):
st.write("New chat initiated.")
# Chat options
chat_options = [
"How can I transfer files outside...",
"Summarise Directive 67 in 5...",
"Give me the key trends in FS...",
"Who should I contact for laptop...",
"Generate Python script that say...",
"What are employee benefits?",
"What is Apple? How well does...",
"Do we have car fleet discounts?"
]
selected_chat = st.selectbox("Select a chat:", chat_options)
# Main content area
st.markdown("<h1 style='text-align: center;'>Search inside Pictet Knowledge</h1>", unsafe_allow_html=True)
st.markdown("<h3 style='text-align: center;'>EMPLOYEE CHATBOT</h3>", unsafe_allow_html=True)
# Information about the chatbot
st.markdown(
"""
<div style='border: 1px solid #e0e0e0; padding: 20px; margin: 20px; border-radius: 8px;'>
<p>
<span style='color: green; font-weight: bold;'></span>
Ask questions on Pictet topics, using any language. You can ask the chatbot to provide an answer in any style or format (e.g., bullet points or three paragraphs).<br><br>
To delve deeper into the 'Pictet Knowledge' functionality and in-scope documents, consult our online FAQ or simply ask the chatbot.
</p>
</div>
""",
unsafe_allow_html=True
)
st.markdown(
"""
<div style='border: 1px solid #e0e0e0; padding: 20px; margin: 20px; border-radius: 8px;'>
<p>
<span style='color: orange; font-weight: bold;'>??</span>
The chatbot can provide inaccurate answers. It's good practice to verify sources before using the information further.<br>
We are still in beta mode and feedback is welcome : please complete our survey and share your experience.
</p>
</div>
""",
unsafe_allow_html=True
)
# Input field for user queries
user_query = st.text_input("Pictet Knowledge", key="user_query")
# Get response from chatbot
#if user_query:
# response = chatbot.get_response(user_query)
# st.write(f"**Response:** {response}")
# Buttons for different chatbot functionalities
col1, col2, col3 = st.columns(3)
with col1:
st.button("Explain the Pictet Group history.", use_container_width=True)
with col2:
st.button("What's for lunch at Cafe 1805?", use_container_width=True)
with col3:
st.button("Summarise Directive 51 in 5 bullet points.", use_container_width=True)
# Footer
st.markdown(
"""
<style>
footer {
visibility: hidden;
}
footer:after {
content:'POWERED BY UNIQUE (v 1.1.6)';
visibility: visible;
display: block;
position: relative;
text-align: center;
padding: 5px;
top: 3px;
}
</style>
""",
unsafe_allow_html=True
)