Cricket_Info / app.py
sree4411's picture
Update app.py
f98d692 verified
import streamlit as st
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# ๐Ÿ”น Custom CSS for Background Image
#st.markdown(
# """
# <style>
# .stApp {
# background-image: url('https://media.istockphoto.com/id/1404615645/vector/abstract-colorful-background.jpg?s=612x612&w=0&k=20&c=_bVzbN6dsseE2ivU0TyzMUjozAYkO8VMxaZCBs7Ft_I=');
# background-size: cover;
# background-repeat: no-repeat;
# background-position: center;
#}
#</style>
# """,
# unsafe_allow_html=True
#)
#st.markdown(
# """
# <style>
# .stApp {
# background: linear-gradient(to right, #2E1A47, #3D2352); /* Dark purple gradient */
# }
# </style>
# """,
# unsafe_allow_html=True
#)
# ๐Ÿ”น App Title
st.markdown(
"<h1 style='text-align: center; color: red;'>๐Ÿ All About Cricket โ€“ Your Ultimate Stats Hub! </h1>",
unsafe_allow_html=True
)
# ๐Ÿ”น Introduction
st.markdown(
"""
<h3 style='text-align: center; color:rainbow;'>This app is dedicated to all Cricket Lovers! ๐Ÿโค๏ธ</h3>
<p style='text-align: justify;'>
Whether you're a die-hard fan or a casual follower, this app provides detailed statistics of
your favorite cricketers, their performance across different formats, and insightful visualizations.
</p>
""",
unsafe_allow_html=True
)
# ๐Ÿ”น About Cricket
st.markdown(
"""
<h3 style='text-align: left; color: blue;'>What is Cricket?</h3>
<p>
Cricket is one of the most popular sports in the world.
It is a bat-and-ball game played between two teams of eleven players each. The game is known for its
different formats:
</p>
<ul>
<li><strong>Test Cricket:</strong> The longest format, played over five days, testing a player's endurance and skill.</li>
<li><strong>One Day Internationals (ODIs):</strong> A limited-overs format where each team gets 50 overs.</li>
<li><strong>T20 Cricket:</strong> The shortest and most exciting format, with each team playing 20 overs.</li>
<li><strong>IPL (Indian Premier League):</strong> One of the biggest T20 leagues in the world, featuring top players from different countries.</li>
</ul>
<p>Cricket is more than just a gameโ€”itโ€™s a passion that unites millions of fans across the globe!</p>
""",
unsafe_allow_html=True
)
# ๐Ÿ”น About the Application
st.markdown(
"""
<h3 style='text-align: left; color: blue;'>About the Application</h3>
<p style='text-align: justify;'>
Welcome to the "All About Cricket" app, your go-to platform for all cricket stats! This app is designed to give cricket fans quick and easy access to the latest statistics of their favorite players. You can:
</p>
<ul>
<li><strong>Explore detailed player statistics:</strong> View batting and bowling stats across different formats like Test, ODI, T20, and IPL.</li>
<li><strong>Visualize player performance:</strong> See interactive charts and graphs representing the player's performance in various formats.</li>
<li><strong>Get insights into batting and bowling performances:</strong> Analyze runs, wickets, and more through powerful visualizations like bar charts and pie charts.</li>
<li><strong>Stay up to date:</strong> Explore a user-friendly interface to easily navigate through player stats and compare different formats.</li>
</ul>
<p>This application is perfect for cricket enthusiasts, analysts, and anyone who wants to dive deep into the world of cricket statistics.</p>
""",
unsafe_allow_html=True
)
# ๐Ÿ”น Navigation Button to Player Statistics Page
st.markdown(
"""
<h4 style='text-align: left; color: orange;'>Click the button below to explore player statistics, insights, and visualizations!</h4>
""",
unsafe_allow_html=True
)
if st.button("Explore Player Stats"):
st.switch_page("pages/player_stats.py") # Ensure the file exists in the pages/ directory
# ๐Ÿ”น Author Section
st.markdown(
"""
<h2 style='text-align: center; color: blue;'>About the Author</h2>
<p style='text-align: justify;'>
Hello! I'm <strong>Jayasree Mandali</strong>, Data Science and Machine Learning Enthusiast.
I developed this app for cricket fans.
Enjoy exploring cricket like never before! ๐Ÿš€
</p>
""",
unsafe_allow_html=True
)