Spaces:
No application file
No application file
import streamlit as st | |
import base64 | |
from PIL import Image | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# Set the page configuration | |
st.set_page_config(page_title="Roadmap Academy", page_icon=":rocket:") | |
# Define a function to set background image | |
def set_background(png_file): | |
with open(png_file, "rb") as f: | |
bin_str = base64.b64encode(f.read()).decode() | |
page_bg_img = f''' | |
<style> | |
[data-testid="stAppViewContainer"] {{ | |
background-image: url("data:image/png;base64,{bin_str}"); | |
background-size: cover; | |
}} | |
</style> | |
''' | |
st.markdown(page_bg_img, unsafe_allow_html=True) | |
# Set a background image | |
set_background("cool_background.png") # Use a cool background image | |
# Create the organization card | |
st.title("Roadmap Academy") | |
st.write("An Educational Technologies Company") | |
st.write("Motto: Polaris Prowess") | |
st.write("[Website](https://roadmap.academy)") | |
# Add a cool image or logo | |
image = Image.open("roadmap_logo.png") # Use your company logo or cool image | |
st.image(image, use_column_width=True) | |
# Add interactive components | |
if st.button("Click Me"): | |
st.success("You clicked the button!") # Cool feedback for interaction | |
# Create a simple chart or plot for additional coolness | |
data = { | |
'Category': ['A', 'B', 'C', 'D'], | |
'Values': [10, 15, 25, 30] | |
} | |
df = pd.DataFrame(data) | |
st.bar_chart(df) # Display a simple bar chart to add interactivity | |
# Footer with custom text | |
st.write("© 2024 Roadmap Academy. All rights reserved.") | |