import streamlit as st import base64 # βœ… Add this from streamlit_extras.switch_page_button import switch_page # Load and encode background image def get_base64_bg(image_path): with open(image_path, "rb") as img_file: encoded = base64.b64encode(img_file.read()).decode() return f"data:image/jpg;base64,{encoded}" background_img = get_base64_bg("background.jpg") # Inject custom CSS with background st.markdown( f""" """, unsafe_allow_html=True ) # App Header with Logo st.markdown( """
🏏 Cric Metrics - AI-Powered Cricket Insights 🏏
""", unsafe_allow_html=True ) # Sub-sections st.markdown("

Cricket - The Gentleman’s Game πŸ†

", unsafe_allow_html=True) st.markdown( "

" "Cricket is one of the most popular sports worldwide, loved by millions. " "It is played in multiple formats, including Tests, ODIs, and T20s. " "With legendary players, thrilling rivalries, and unforgettable moments, cricket is more than a gameβ€”it's an emotion! 🏏" "

", unsafe_allow_html=True ) st.markdown("

What is Cric Metrics? πŸ“Š

", unsafe_allow_html=True) st.markdown( "

" "Cric Metrics is an AI-powered cricket analytics platform. It offers player comparisons, performance analysis, " "team stats, and match predictions. It empowers fans, analysts, and teams with smart, data-driven insights. πŸ€–πŸ“ˆ" "

", unsafe_allow_html=True ) # Add more info if you'd like st.markdown("

More About Cric Metrics

", unsafe_allow_html=True) st.markdown( "

" "From grassroots cricket to international glory, Cric Metrics helps track form, fitness, and match-winning impact. " "We leverage machine learning models and visual analytics to make cricket smarter and more fun! πŸš€" "

", unsafe_allow_html=True ) # About Author st.markdown("

About the Author πŸ‘¨β€πŸ’»

", unsafe_allow_html=True) st.markdown( """
Sai Kalyan Satwik is a seasoned cricket enthusiast and tech entrepreneur having experience in data science and software development.

His passion for cricket meets his technical expertise in this app, blending numbers with narratives for fans and analysts alike.
""", unsafe_allow_html=True ) # Button if st.button("πŸ“Š Player Information"): st.switch_page("pages/1player_information.py") # Footer st.markdown("", unsafe_allow_html=True)