wellbeing_GenAI / app.py
tahirsher's picture
Update app.py
1af4b74 verified
raw
history blame
1.72 kB
import streamlit as st
# Inject custom CSS for a centered flower with background gradient
st.markdown(
"""
<style>
/* General background with gradient */
html, body, [data-testid="stAppViewContainer"] {
background-image: linear-gradient(
to bottom right,
rgba(135, 206, 250, 0.5), /* Light Sky Blue */
rgba(255, 223, 186, 0.5), /* Soft Peach */
rgba(192, 192, 192, 0.5), /* Bright Silver */
rgba(169, 169, 169, 0.5), /* Gray */
rgba(240, 248, 255, 0.5), /* Alice Blue */
rgba(173, 216, 230, 0.5) /* Light Blue */
);
background-size: cover;
font-family: 'Arial', sans-serif;
position: relative;
}
/* Centered flower */
.flower {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 150px;
height: 150px;
background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/3/30/Red_flower.svg/1200px-Red_flower.svg.png");
background-size: contain;
background-repeat: no-repeat;
}
</style>
""",
unsafe_allow_html=True
)
# Add the flower element to the center of the app
st.markdown('<div class="flower"></div>', unsafe_allow_html=True)
# Streamlit UI elements
st.title("Word Cloud Application")
st.markdown("Welcome to the Word Cloud Application with a beautiful flower in the background!")
# Add some interactivity
if st.button("Click Me"):
st.write("You clicked the button!")
# Add a select box
option = st.selectbox(
"Choose an option:",
["Option 1", "Option 2", "Option 3"]
)
st.write(f"You selected: {option}")