Cric_Metrics / home.py
Sathwikchowdary's picture
Update home.py
29b864c verified
raw
history blame
3.21 kB
import streamlit as st
from streamlit_extras.switch_page_button import switch_page
# Initialize session state to track which button was clicked
if 'button_clicked' not in st.session_state:
st.session_state.button_clicked = None
# Custom styles
st.markdown(
"""
<style>
.stApp {
background-color: skyblue;
}
</style>
""",
unsafe_allow_html=True,
)
# Initialize session state variables
for key in ['page', 'jupyter_clicked', 'pdf_clicked', 'excel_clicked']:
if key not in st.session_state:
st.session_state[key] = 'home' if key == 'page' else False
# App Header
st.markdown("<h1 style='text-align: center; color: red;'>🏏 Cric Metrics - AI-Powered Cricket Insights 🏏</h1>", unsafe_allow_html=True)
# Cricket Information
st.markdown("<h2 style='color: darkorange;'>Cricket - The Gentleman’s Game πŸ†</h2>", unsafe_allow_html=True)
st.markdown(
"<p style='font-size: 16px; color: black; font-style: italic;'>"
"Cricket is one of the most popular sports worldwide, loved by millions. It is played in multiple formats, including Test matches, One Day Internationals (ODIs), and T20s. "
"With legendary players, thrilling rivalries, and unforgettable moments, cricket has become more than just a gameβ€”it's an emotion for fans around the globe."
"</p>",
unsafe_allow_html=True
)
st.markdown(
"<p style='font-size: 16px; color: black; font-style: italic;'>"
"The game revolves around strategy, skill, and teamwork. Factors like pitch conditions, player form, and weather play a crucial role in match outcomes. "
"With data analytics and AI, cricket insights have evolved, offering deeper understanding and predictions."
"</p>",
unsafe_allow_html=True
)
# About Cric Metrics
st.markdown("<h2 style='color: blue;'>What is Cric Metrics? πŸ“Š</h2>", unsafe_allow_html=True)
st.markdown(
"<p style='font-size: 16px; color: black; font-style: italic;'>"
"Cric Metrics is an advanced cricket analytics platform designed to provide in-depth insights, player comparisons, "
"score predictions, and team analysis using AI and machine learning."
"</p>",
unsafe_allow_html=True
)
st.markdown(
"<p style='font-size: 16px; color: black; font-style: italic;'>"
"Key Features:<br>"
"βœ… <b>Player Profiles & Comparisons</b> – Analyze detailed stats and compare players across formats.<br>"
"βœ… <b>Team Analysis</b> – Head-to-head matchups, recent performance, and winning probabilities.<br>"
"βœ… <b>Score Prediction</b> – AI-driven forecasts based on historical data and live conditions.<br>"
"</p>",
unsafe_allow_html=True
)
st.markdown(
"<p style='font-size: 16px; color: black; font-style: italic;'>"
"Whether you're a cricket enthusiast, fantasy league player, or analyst, Cric Metrics gives you the edge with data-driven insights!"
"</p>",
unsafe_allow_html=True
)
# Author Section
st.markdown("<h2 style='color: green;'>About the Author πŸ‘¨β€πŸ’»</h2>", unsafe_allow_html=True)
st.markdown(
"<p style='font-size: 16px; color: black; font-style: italic;'>"
"<b>Sai Kalyan Satwik</b>"
"</p>",
unsafe_allow_html=True
)