Cricket / Home.py
Clone77's picture
Update Home.py
31ff70b verified
import streamlit as st
import pandas as pd
import base64
import streamlit.components.v1 as components
def set_bg():
bg_style = """
<style>
.stApp {
background-color: #D4C9BE; /* Beige background */
color: black;
}
.text-box {
background-color: rgba(255, 255, 255, 0.8);
padding: 25px;
border-radius: 10px;
margin-top: 20px;
color: black;
}
h1, h2, h3, h4, h5, h6 {
color: black !important;
text-align: center;
}
</style>
"""
st.markdown(bg_style, unsafe_allow_html=True)
# Apply beige background and black text
set_bg()
# Create 2 columns
col1, col2 = st.columns([2, 1]) # Title gets more width than animation
with col1:
st.title("πŸ† The Stats Pitch")
# About Cricket
col1, col2 = st.columns([2, 1])
with col1:
st.subheader("🏏 About Cricket")
st.markdown("""
- Cricket is a globally celebrated sport, cherished for its thrilling matches and historic rivalries.
- Originating in England, the game has evolved into a passion for millions. 🌍
- Whether it’s a nail-biting **T20 finish** or the endurance of a **Test match**, cricket brings together skill, strategy, and teamwork.
- With formats ranging from **ODIs** to innovative leagues, cricket continues to captivate audiences and redefine sportsmanship.
""")
with col2:
components.html(
"""
<script src="https://unpkg.com/@dotlottie/player-component@2.7.12/dist/dotlottie-player.mjs" type="module"></script>
<dotlottie-player
src="https://lottie.host/04bff734-847b-4421-a180-197324166081/7WyVLEBZMa.lottie"
background="transparent"
speed="1"
style="width: 200px; height: 200px;"
loop autoplay>
</dotlottie-player>
""",
height=200,
width=200
)
# Divider after section
st.markdown("---")
# About the Web Application
st.subheader("🌐 About the Web Application")
st.markdown("""
This web application provides in-depth insights into the careers of professional cricket players, showcasing key statistics like:
- πŸ†” **Player ID**
- 🏏 **Debut & Last Played Year**
- πŸ“Š **Format-wise Career Stats (Test, ODI, T20, IPL)**
- πŸ“ˆ **Performance Trends Over Time**
- πŸ“Œ **Bowling & Batting Breakdowns**
Powered by **Hugging Face**, this interactive platform enables users to explore a player’s journey across formats with clean visuals and intuitive dashboards.
""")
st.markdown("---")
# 🌟 New Section: Dashboard Summary
st.subheader("πŸ“Š Dashboard Summary")
st.markdown("""
Our dashboard brings a cricketer's journey to life using modern data visualization techniques:
- 🏏 **Batting & Bowling Career Summaries**: See a format-wise breakdown of runs, strike rate, averages, wickets, economy, and milestones (100s, 5w, etc.).
- 🧠 **Smart Visuals**: Interactive charts like bar graphs, pie charts, and line charts that make data both beautiful and informative.
- 🧭 **Career Progression**: Track how a player has performed over the years with progression graphs for runs and wickets.
- 🎯 **Side-by-side Insights**: Compare metrics like average vs strike rate or 5w vs 10w hauls in a 2Γ—2 grid layout.
- πŸŒ„ **Stylish Themes**: Dark-themed charts and background options for enhanced readability and presentation.
This dashboard is crafted to serve cricket fans, analysts, and casual viewers with an experience that's as seamless as it is insightful. πŸ§’πŸ“‰
""")
st.markdown("---")
# About the Author
st.subheader("πŸ‘¨β€πŸ’» About the Author")
st.markdown("""
Hi, I’m **Kaustubh Yewale**, a passionate AI and data science enthusiast. With experience as an **AI Developer Intern**,
I’ve worked on exciting projects, including:
- πŸ€– AQI analysis based on pollutants
- πŸ›‘οΈ AQI prediction ML model
- πŸ“ˆ Rain prediction
I aim to make data accessible and engaging, one innovative project at a time.
πŸ“« **Connect with me**:
- [LinkedIn](https://www.linkedin.com/in/kaustubh-yewale-3902551b9)
- [GitHub](https://github.com/Kaustubh102)
""")