MentorMinds_Bot / Home.py
Clone77's picture
Rename app.py to Home.py
95ffd7d verified
import streamlit as st
# Set page config
st.set_page_config(page_title="MentorMinds Bot", layout="centered")
# Inject custom CSS for background and buttons
st.markdown("""
<style>
.main {
background-color: #8B0000;
padding: 20px;
}
.stButton>button {
background-color: #B76F27;
color: #8B0000;
border: 2px solid #8B0000;
border-radius: 10px;
padding: 10px 20px;
font-size: 18px;
font-weight: bold;
width: 100%;
transition: 0.3s ease-in-out;
}
.stButton>button:hover {
background-color: #8B0000;
color: #ffffff;
border: 2px solid white;
}
h1, h3, p {
color: white;
}
</style>
""", unsafe_allow_html=True)
#----------------------------------------------------------
from streamlit_lottie import st_lottie
import requests
# Load Lottie animation from URL
def load_lottie_url(url):
r = requests.get(url)
if r.status_code != 200:
return None
return r.json()
lottie_url = "https://lottie.host/1f0a9697-c698-4c89-8c10-3d505a5c99ca/kHiz6bHsZD.json"
lottie_animation = load_lottie_url(lottie_url)
# Title and Lottie animation side by side
left_col, right_col = st.columns([2, 1])
with left_col:
st.title("MentorMinds Bot")
st.markdown("### πŸ‘‹ Welcome to the MentorMinds Bot!")
st.markdown("This dashboard will guide you through your doubts in various modules.")
st.markdown("## In which module do you have doubt?")
with right_col:
st_lottie(lottie_animation, speed=1, height=250, key="mentorminds")
#----------------------------------------------------------
# # Title and intro
# st.title("MentorMinds Bot")
# st.markdown("### πŸ‘‹ Welcome to the MentorMinds Bot!")
# st.markdown("This dashboard will guide you through your doubts in various modules.")
# st.markdown("## In which module do you have doubt?")
# Button layout - 2 per row
col1, col2 = st.columns(2)
with col1:
if st.button("Python"):
st.switch_page("pages/python.py")
with col2:
if st.button("Machine Learning"):
st.switch_page("pages/machine_learning.py")
col3, col4 = st.columns(2)
with col3:
if st.button("Deep Learning"):
st.switch_page("pages/deep_learning.py")
with col4:
if st.button("Statistics"):
st.switch_page("pages/statistics.py")
col5, col6 = st.columns(2)
with col5:
if st.button("Excel"):
st.switch_page("pages/excel.py")
with col6:
if st.button("SQL"):
st.switch_page("pages/sql.py")