Upload app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import streamlit as st
|
|
| 3 |
# Custom CSS to mimic the design in the image
|
| 4 |
st.markdown("""
|
| 5 |
<style>
|
|
|
|
| 6 |
.big-font {
|
| 7 |
font-size:50px !important;
|
| 8 |
font-weight: bold;
|
|
@@ -17,16 +18,15 @@ st.markdown("""
|
|
| 17 |
padding: 20px;
|
| 18 |
margin: 10px;
|
| 19 |
}
|
| 20 |
-
.button-custom {
|
| 21 |
-
background-color: #FF5F00;
|
| 22 |
-
color: white;
|
| 23 |
-
border-radius: 5px;
|
| 24 |
-
border: none;
|
| 25 |
-
}
|
| 26 |
.top-bar {
|
| 27 |
background-color: #000000;
|
| 28 |
color: white;
|
| 29 |
-
padding: 10px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
display: flex;
|
| 31 |
align-items: center;
|
| 32 |
justify-content: start;
|
|
@@ -37,10 +37,19 @@ st.markdown("""
|
|
| 37 |
}
|
| 38 |
.brand-bot-title {
|
| 39 |
font-size: 24px;
|
| 40 |
-
margin-left: 10px;
|
| 41 |
font-weight: bold;
|
| 42 |
color: white;
|
| 43 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
</style>
|
| 45 |
""", unsafe_allow_html=True)
|
| 46 |
|
|
@@ -52,23 +61,24 @@ st.markdown("""
|
|
| 52 |
</div>
|
| 53 |
""", unsafe_allow_html=True)
|
| 54 |
|
| 55 |
-
#
|
| 56 |
-
st.
|
| 57 |
-
st.sidebar.button("+ New Chat", key="new_chat", on_click=None, args=None, kwargs=None, disabled=False)
|
| 58 |
|
| 59 |
-
#
|
| 60 |
-
st.
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
-
|
| 66 |
-
|
| 67 |
-
- What is the right trademark attribution line for marketing collateral?
|
| 68 |
-
""")
|
| 69 |
|
| 70 |
-
#
|
| 71 |
-
|
| 72 |
|
| 73 |
-
#
|
| 74 |
-
st.markdown('<p class="brand-color">Brand Bot is in beta release. Review our guidelines before proceeding.</p>', unsafe_allow_html=True)
|
|
|
|
| 3 |
# Custom CSS to mimic the design in the image
|
| 4 |
st.markdown("""
|
| 5 |
<style>
|
| 6 |
+
/* CSS styles */
|
| 7 |
.big-font {
|
| 8 |
font-size:50px !important;
|
| 9 |
font-weight: bold;
|
|
|
|
| 18 |
padding: 20px;
|
| 19 |
margin: 10px;
|
| 20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
.top-bar {
|
| 22 |
background-color: #000000;
|
| 23 |
color: white;
|
| 24 |
+
padding: 10px 0px;
|
| 25 |
+
position: fixed;
|
| 26 |
+
top: 0;
|
| 27 |
+
left: 0;
|
| 28 |
+
right: 0;
|
| 29 |
+
z-index: 999;
|
| 30 |
display: flex;
|
| 31 |
align-items: center;
|
| 32 |
justify-content: start;
|
|
|
|
| 37 |
}
|
| 38 |
.brand-bot-title {
|
| 39 |
font-size: 24px;
|
|
|
|
| 40 |
font-weight: bold;
|
| 41 |
color: white;
|
| 42 |
}
|
| 43 |
+
.stSidebar {
|
| 44 |
+
display: none;
|
| 45 |
+
}
|
| 46 |
+
.main-body {
|
| 47 |
+
margin-top: 70px;
|
| 48 |
+
}
|
| 49 |
+
/* Adjust padding for main content to give space for fixed header */
|
| 50 |
+
.css-18e3th9 {
|
| 51 |
+
padding-top: 70px;
|
| 52 |
+
}
|
| 53 |
</style>
|
| 54 |
""", unsafe_allow_html=True)
|
| 55 |
|
|
|
|
| 61 |
</div>
|
| 62 |
""", unsafe_allow_html=True)
|
| 63 |
|
| 64 |
+
# Mimic a sidebar with a custom layout inside the main body
|
| 65 |
+
st.markdown('<div class="main-body">', unsafe_allow_html=True)
|
|
|
|
| 66 |
|
| 67 |
+
# Creating a custom sidebar
|
| 68 |
+
sidebar_col, main_col = st.columns([1, 5], gap="small")
|
| 69 |
+
with sidebar_col:
|
| 70 |
+
st.markdown("## Sidebar")
|
| 71 |
+
st.text("This is some text before the New Chat button.")
|
| 72 |
+
if st.button("New Chat", key="new_chat"):
|
| 73 |
+
# Your button click handling here
|
| 74 |
+
pass
|
| 75 |
|
| 76 |
+
with main_col:
|
| 77 |
+
# Main page layout
|
| 78 |
+
st.markdown('<p class="big-font">Hello!</p>', unsafe_allow_html=True)
|
| 79 |
+
st.markdown('<p>I\'m Brand Bot, an internal chatbot that provides you with fast, reliable information about the Mastercard brand. How can I help you today?</p>', unsafe_allow_html=True)
|
|
|
|
|
|
|
| 80 |
|
| 81 |
+
# Example requests and the rest of your main content
|
| 82 |
+
# ...
|
| 83 |
|
| 84 |
+
st.markdown('</div>', unsafe_allow_html=True) # End of main-body div
|
|
|