Spaces:
Sleeping
Sleeping
Update Home.py
Browse files
Home.py
CHANGED
@@ -1,77 +1,76 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
3 |
-
import numpy as np
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
text-align: center;
|
24 |
-
margin-top: 5px;
|
25 |
-
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
|
26 |
-
}
|
27 |
-
.division {
|
28 |
-
margin: 20px auto;
|
29 |
-
padding: 20px;
|
30 |
-
background: rgba(255, 255, 255, 0.1);
|
31 |
-
border-radius: 10px;
|
32 |
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
33 |
-
}
|
34 |
-
.division h2 {
|
35 |
-
color: Black;
|
36 |
-
margin-bottom: 10px;
|
37 |
-
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
|
38 |
-
}
|
39 |
-
.division p {
|
40 |
-
line-height: 1.5;
|
41 |
-
font-size: 1.0rem;
|
42 |
-
}
|
43 |
-
</style>
|
44 |
-
"""
|
45 |
-
st.write(custom_css, unsafe_allow_html=True)
|
46 |
|
47 |
# App Header
|
48 |
-
st.markdown("<h1 style='text-align: center; color:
|
49 |
|
50 |
-
#
|
51 |
-
st.markdown("<h2 style='color:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
st.markdown(
|
53 |
-
"<p style='font-size: 16px; color:
|
54 |
-
"
|
55 |
-
"
|
56 |
-
"The app highlights their challenges, setbacks, and perseverance in transitioning from a beginner to an expert in data science, offering a motivational zero-to-hero story."
|
57 |
"</p>",
|
58 |
unsafe_allow_html=True
|
59 |
)
|
60 |
|
61 |
-
#
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
# Author Section
|
72 |
-
st.markdown("<h2 style='color:
|
73 |
st.markdown(
|
74 |
-
"<p style='font-size: 16px; color:
|
75 |
"<b>Sai Kalyan Satwik</b>"
|
76 |
"</p>",
|
77 |
unsafe_allow_html=True
|
|
|
1 |
import streamlit as st
|
2 |
+
from streamlit_extras.switch_page_button import switch_page
|
|
|
3 |
|
4 |
+
# Initialize session state to track which button was clicked
|
5 |
+
if 'button_clicked' not in st.session_state:
|
6 |
+
st.session_state.button_clicked = None
|
7 |
|
8 |
+
# Custom styles
|
9 |
+
st.markdown(
|
10 |
+
"""
|
11 |
+
<style>
|
12 |
+
.stApp {
|
13 |
+
background-color: skyblue;
|
14 |
+
}
|
15 |
+
</style>
|
16 |
+
""",
|
17 |
+
unsafe_allow_html=True,
|
18 |
+
)
|
19 |
+
|
20 |
+
# Initialize session state variables
|
21 |
+
for key in ['page', 'jupyter_clicked', 'pdf_clicked', 'excel_clicked']:
|
22 |
+
if key not in st.session_state:
|
23 |
+
st.session_state[key] = 'home' if key == 'page' else False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
# App Header
|
26 |
+
st.markdown("<h1 style='text-align: center; color: red;'>π Cric Metrics - AI-Powered Cricket Insights π</h1>", unsafe_allow_html=True)
|
27 |
|
28 |
+
# Cricket Information
|
29 |
+
st.markdown("<h2 style='color: darkorange;'>Cricket - The Gentlemanβs Game π</h2>", unsafe_allow_html=True)
|
30 |
+
st.markdown(
|
31 |
+
"<p style='font-size: 16px; color: black; font-style: italic;'>"
|
32 |
+
"Cricket is one of the most popular sports worldwide, loved by millions. It is played in multiple formats, including Test matches, One Day Internationals (ODIs), and T20s. "
|
33 |
+
"With legendary players, thrilling rivalries, and unforgettable moments, cricket has become more than just a gameβit's an emotion for fans around the globe."
|
34 |
+
"</p>",
|
35 |
+
unsafe_allow_html=True
|
36 |
+
)
|
37 |
st.markdown(
|
38 |
+
"<p style='font-size: 16px; color: black; font-style: italic;'>"
|
39 |
+
"The game revolves around strategy, skill, and teamwork. Factors like pitch conditions, player form, and weather play a crucial role in match outcomes. "
|
40 |
+
"With data analytics and AI, cricket insights have evolved, offering deeper understanding and predictions."
|
|
|
41 |
"</p>",
|
42 |
unsafe_allow_html=True
|
43 |
)
|
44 |
|
45 |
+
# About Cric Metrics
|
46 |
+
st.markdown("<h2 style='color: blue;'>What is Cric Metrics? π</h2>", unsafe_allow_html=True)
|
47 |
+
st.markdown(
|
48 |
+
"<p style='font-size: 16px; color: black; font-style: italic;'>"
|
49 |
+
"Cric Metrics is an advanced cricket analytics platform designed to provide in-depth insights, player comparisons, "
|
50 |
+
"score predictions, and team analysis using AI and machine learning."
|
51 |
+
"</p>",
|
52 |
+
unsafe_allow_html=True
|
53 |
+
)
|
54 |
+
st.markdown(
|
55 |
+
"<p style='font-size: 16px; color: black; font-style: italic;'>"
|
56 |
+
"Key Features:<br>"
|
57 |
+
"β
<b>Player Profiles & Comparisons</b> β Analyze detailed stats and compare players across formats.<br>"
|
58 |
+
"β
<b>Team Analysis</b> β Head-to-head matchups, recent performance, and winning probabilities.<br>"
|
59 |
+
"β
<b>Score Prediction</b> β AI-driven forecasts based on historical data and live conditions.<br>"
|
60 |
+
"</p>",
|
61 |
+
unsafe_allow_html=True
|
62 |
+
)
|
63 |
+
st.markdown(
|
64 |
+
"<p style='font-size: 16px; color: black; font-style: italic;'>"
|
65 |
+
"Whether you're a cricket enthusiast, fantasy league player, or analyst, Cric Metrics gives you the edge with data-driven insights!"
|
66 |
+
"</p>",
|
67 |
+
unsafe_allow_html=True
|
68 |
+
)
|
69 |
|
70 |
# Author Section
|
71 |
+
st.markdown("<h2 style='color: green;'>About the Author π¨βπ»</h2>", unsafe_allow_html=True)
|
72 |
st.markdown(
|
73 |
+
"<p style='font-size: 16px; color: black; font-style: italic;'>"
|
74 |
"<b>Sai Kalyan Satwik</b>"
|
75 |
"</p>",
|
76 |
unsafe_allow_html=True
|