Update app.py
Browse files
app.py
CHANGED
|
@@ -1,94 +1,54 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
import base64
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
|
|
|
| 6 |
<style>
|
| 7 |
.stApp {
|
| 8 |
-
background: linear-gradient(to right, #
|
| 9 |
-
color: #
|
| 10 |
}
|
| 11 |
-
.
|
| 12 |
text-align: center;
|
| 13 |
-
color: #
|
|
|
|
| 14 |
}
|
| 15 |
-
.
|
| 16 |
font-size: 16px;
|
| 17 |
line-height: 1.6;
|
| 18 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</style>
|
| 20 |
-
"""
|
| 21 |
-
st.markdown(bg_style, unsafe_allow_html=True)
|
| 22 |
-
|
| 23 |
-
# Apply background and styles
|
| 24 |
-
set_bg()
|
| 25 |
-
|
| 26 |
-
# Title Section
|
| 27 |
-
st.title("π The Stats Pitch")
|
| 28 |
-
|
| 29 |
-
# About Cricket Section
|
| 30 |
-
st.header("π About Cricket")
|
| 31 |
-
st.markdown(
|
| 32 |
-
"""
|
| 33 |
-
- Cricket is a globally celebrated sport, cherished for its thrilling matches and historic rivalries.
|
| 34 |
-
- Originating in England, the game has evolved into a passion for millions. π
|
| 35 |
-
- Whether itβs a nail-biting **T20 finish** or the endurance of a **Test match**, cricket brings together skill, strategy, and teamwork.
|
| 36 |
-
- With formats ranging from **ODIs** to innovative leagues, cricket continues to captivate audiences and redefine sportsmanship.
|
| 37 |
""",
|
| 38 |
-
unsafe_allow_html=True
|
| 39 |
)
|
| 40 |
|
| 41 |
-
|
|
|
|
| 42 |
|
| 43 |
-
#
|
| 44 |
-
st.header("π About the Web Application")
|
| 45 |
st.markdown(
|
| 46 |
"""
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
-
|
| 50 |
-
- π **Format-wise Career Stats (Test, ODI, T20, IPL)**
|
| 51 |
-
- π **Performance Trends Over Time**
|
| 52 |
-
- π **Bowling & Batting Breakdowns**
|
| 53 |
-
"""
|
| 54 |
-
)
|
| 55 |
-
|
| 56 |
-
st.markdown("---")
|
| 57 |
-
|
| 58 |
-
# Dashboard Summary
|
| 59 |
-
st.header("π Dashboard Summary")
|
| 60 |
-
st.markdown(
|
| 61 |
-
"""
|
| 62 |
-
Our dashboard brings a cricketer's journey to life using modern data visualization techniques:
|
| 63 |
-
- π **Batting & Bowling Career Summaries**: Format-wise breakdown of runs, averages, wickets, and milestones.
|
| 64 |
-
- π§ **Smart Visuals**: Interactive charts that make data both beautiful and informative.
|
| 65 |
-
- π― **Career Progression**: Track player performance over the years.
|
| 66 |
-
- π **Stylish Themes**: Clean, readable design with easy navigation.
|
| 67 |
-
"""
|
| 68 |
-
)
|
| 69 |
-
|
| 70 |
-
st.markdown("---")
|
| 71 |
-
|
| 72 |
-
# About the Author
|
| 73 |
-
st.header("π¨βπ» About the Author")
|
| 74 |
-
st.markdown(
|
| 75 |
-
"""
|
| 76 |
-
Hi, Iβm **Kaustubh Yewale**, a passionate AI and data science enthusiast. With experience as an **AI Developer Intern**,
|
| 77 |
-
Iβve worked on exciting projects, including:
|
| 78 |
-
- π€ AQI analysis based on pollutants
|
| 79 |
-
- π‘οΈ AQI prediction ML model
|
| 80 |
-
- π Rain prediction
|
| 81 |
|
| 82 |
-
|
| 83 |
-
-
|
| 84 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
""",
|
| 86 |
-
unsafe_allow_html=True
|
| 87 |
)
|
| 88 |
|
| 89 |
-
# Sidebar
|
| 90 |
-
st.sidebar.
|
| 91 |
-
st.sidebar.markdown("**π€ Name:**
|
| 92 |
st.sidebar.markdown("**π§ Email:** singhshwet05@gmail.com")
|
| 93 |
-
|
| 94 |
-
st.markdown("Made with β€οΈ using Streamlit")
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
+
# Custom CSS for styling
|
| 4 |
+
st.markdown(
|
| 5 |
+
"""
|
| 6 |
<style>
|
| 7 |
.stApp {
|
| 8 |
+
background: linear-gradient(to right, #f3e5f5, #e1bee7);
|
| 9 |
+
color: #4a148c;
|
| 10 |
}
|
| 11 |
+
.title {
|
| 12 |
text-align: center;
|
| 13 |
+
color: #6a1b9a;
|
| 14 |
+
font-weight: bold;
|
| 15 |
}
|
| 16 |
+
.stMarkdown {
|
| 17 |
font-size: 16px;
|
| 18 |
line-height: 1.6;
|
| 19 |
}
|
| 20 |
+
.sidebar-title {
|
| 21 |
+
font-size: 20px;
|
| 22 |
+
font-weight: bold;
|
| 23 |
+
color: #6a1b9a;
|
| 24 |
+
}
|
| 25 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
""",
|
| 27 |
+
unsafe_allow_html=True
|
| 28 |
)
|
| 29 |
|
| 30 |
+
# Set page title
|
| 31 |
+
st.title("π Cricket Team Players")
|
| 32 |
|
| 33 |
+
# Introduction about the players
|
|
|
|
| 34 |
st.markdown(
|
| 35 |
"""
|
| 36 |
+
## π Introduction to Team Players
|
| 37 |
+
Every successful cricket team is built on a strong foundation of talented players who contribute with their unique skills.
|
| 38 |
+
A well-balanced team consists of skilled batsmen, versatile all-rounders, and impactful bowlers who work together to achieve victory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
**Player Categories:**
|
| 41 |
+
- **β‘ Batsmen:** Responsible for scoring runs, building partnerships, and setting or chasing targets. Some are aggressive strikers, while others anchor the innings.
|
| 42 |
+
- **π― Bowlers:** A mix of fast bowlers and spinners bring variety to the attack, focusing on taking wickets and maintaining control over the opposition.
|
| 43 |
+
- **π All-Rounders:** Players who contribute with both bat and ball provide balance to the team, often playing crucial roles in match situations.
|
| 44 |
+
- **π§€ Wicketkeepers:** The backbone of the fielding unit, wicketkeepers not only take catches and stumpings but also contribute with the bat.
|
| 45 |
+
|
| 46 |
+
With a blend of experience and emerging talent, the team thrives on teamwork, strategy, and determination to succeed on the field.
|
| 47 |
""",
|
| 48 |
+
unsafe_allow_html=True
|
| 49 |
)
|
| 50 |
|
| 51 |
+
# Sidebar - Author Details
|
| 52 |
+
st.sidebar.markdown("<p class='sidebar-title'>π Author Details</p>", unsafe_allow_html=True)
|
| 53 |
+
st.sidebar.markdown("**π€ Name:** Shweta Singh")
|
| 54 |
st.sidebar.markdown("**π§ Email:** singhshwet05@gmail.com")
|
|
|
|
|
|