|
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) |
|
|
|
|
|
set_bg() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
col1, col2 = st.columns([2, 1]) |
|
|
|
with col1: |
|
st.title("π The Stats Pitch") |
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
) |
|
|
|
|
|
st.markdown("---") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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("---") |
|
|
|
|
|
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("---") |
|
|
|
|
|
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) |
|
""") |
|
|
|
|