Spaces:
Sleeping
Sleeping
import streamlit as st | |
from streamlit_extras.switch_page_button import switch_page | |
# Custom styles | |
st.markdown( | |
""" | |
<style> | |
.stApp { | |
background-color: #f0f8ff; | |
} | |
.header { | |
text-align: center; | |
color: red; | |
font-size: 30px; | |
font-weight: bold; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
position: relative; | |
} | |
.logo { | |
position: absolute; | |
right: 10px; | |
top: 0; | |
width: 80px; | |
height: auto; | |
} | |
.sub-header { | |
color: darkorange; | |
font-size: 24px; | |
font-weight: bold; | |
} | |
.text { | |
font-size: 16px; | |
color: black; | |
font-style: italic; | |
} | |
</style> | |
""", | |
unsafe_allow_html=True, | |
) | |
# App Header with Logo on the Right Corner | |
st.markdown( | |
""" | |
<div class='header'> | |
π Cric Metrics - AI-Powered Cricket Insights π | |
<img src='1.png' class='logo'> | |
</div> | |
""", | |
unsafe_allow_html=True | |
) | |
# Cricket Information | |
st.markdown("<h2 class='sub-header'>Cricket - The Gentlemanβs Game π</h2>", unsafe_allow_html=True) | |
st.markdown( | |
"<p class='text'>" | |
"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 | |
) | |
# About Cric Metrics | |
st.markdown("<h2 class='sub-header'>What is Cric Metrics? π</h2>", unsafe_allow_html=True) | |
st.markdown( | |
"<p class='text'>" | |
"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 | |
) | |
# Player Information Button | |
if st.button("π Player Information"): | |
st.switch_page("pages/1player_information.py") | |
# Author Section | |
st.markdown("<h2 class='sub-header'>About the Author π¨βπ»</h2>", unsafe_allow_html=True) | |
st.markdown( | |
"<p class='text'>" | |
"<b>Sai Kalyan Satwik</b> is a seasoned cricket enthusiast and tech entrepreneur. " | |
"He specializes in data science, Python programming, and Exploratory Data Analysis (EDA). ππ" | |
"</p>", | |
unsafe_allow_html=True | |
) | |