Spaces:
Sleeping
Sleeping
Create home.py
Browse files
home.py
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from streamlit_extras.switch_page_button import switch_page
|
3 |
+
import base64
|
4 |
+
import webbrowser
|
5 |
+
|
6 |
+
# Initialize session state to track which button was clicked
|
7 |
+
if 'button_clicked' not in st.session_state:
|
8 |
+
st.session_state.button_clicked = None
|
9 |
+
|
10 |
+
# Custom styles
|
11 |
+
st.markdown(
|
12 |
+
"""
|
13 |
+
<style>
|
14 |
+
.stApp {
|
15 |
+
background-color: blue;
|
16 |
+
}
|
17 |
+
.title {
|
18 |
+
text-align: center;
|
19 |
+
color: red;
|
20 |
+
font-size: 36px;
|
21 |
+
font-family: 'Times New Roman';
|
22 |
+
font-weight: bold;
|
23 |
+
}
|
24 |
+
.header {
|
25 |
+
font-size: 28px;
|
26 |
+
font-family: 'Times New Roman';
|
27 |
+
color: blue;
|
28 |
+
font-style: italic;
|
29 |
+
font-weight: bold;
|
30 |
+
}
|
31 |
+
.header1 {
|
32 |
+
font-size: 24px;
|
33 |
+
font-family: 'Times New Roman';
|
34 |
+
color: green;
|
35 |
+
font-style: italic;
|
36 |
+
font-weight: bold;
|
37 |
+
}
|
38 |
+
.header2 {
|
39 |
+
font-size: 20px;
|
40 |
+
font-family: 'Times New Roman';
|
41 |
+
color: black;
|
42 |
+
font-style: italic;
|
43 |
+
font-weight: bold;
|
44 |
+
}
|
45 |
+
.content {
|
46 |
+
font-size: 16px;
|
47 |
+
font-family: 'Times New Roman';
|
48 |
+
line-height: 1.6;
|
49 |
+
color: black;
|
50 |
+
}
|
51 |
+
.example {
|
52 |
+
font-size: 16px;
|
53 |
+
font-family: 'Times New Roman';
|
54 |
+
font-style: italic;
|
55 |
+
color: black;
|
56 |
+
}
|
57 |
+
</style>
|
58 |
+
""",
|
59 |
+
unsafe_allow_html=True,
|
60 |
+
)
|
61 |
+
|
62 |
+
# Initialize session state variables
|
63 |
+
for key in ['page', 'jupyter_clicked', 'pdf_clicked', 'excel_clicked']:
|
64 |
+
if key not in st.session_state:
|
65 |
+
st.session_state[key] = 'home' if key == 'page' else False
|
66 |
+
|
67 |
+
# Page routing
|
68 |
+
page = st.session_state['page']
|
69 |
+
|
70 |
+
if page == 'home':
|
71 |
+
st.markdown("<div class='title'> Cric Metrics - AI-Powered Cricket Insights </div><br>", unsafe_allow_html=True)
|
72 |
+
st.markdown("<div class='header'>What is Cric Metrics?</div><br>", unsafe_allow_html=True)
|
73 |
+
st.markdown(
|
74 |
+
"""
|
75 |
+
<div class='content'>
|
76 |
+
Cric Metrics is an advanced cricket analytics platform designed to provide in-depth insights, player comparisons, score predictions, and team analysis using AI and machine learning.<br><br>
|
77 |
+
Key Features:<br>
|
78 |
+
1. **Player Profiles & Comparisons** – Analyze detailed stats and compare players across formats.<br>
|
79 |
+
2. **Team Analysis** – Head-to-head matchups, recent performance, and winning probabilities.<br>
|
80 |
+
3. **Score Prediction** – AI-driven forecasts based on historical data and live conditions.<br>
|
81 |
+
<br>
|
82 |
+
Whether you're a cricket enthusiast, fantasy league player, or analyst, Cric Metrics gives you the edge with data-driven insights!
|
83 |
+
</div><br><br>
|
84 |
+
""",
|
85 |
+
unsafe_allow_html=True,
|
86 |
+
)
|
87 |
+
|
88 |
+
st.markdown("<div class='header1'>About the Author</div><br>", unsafe_allow_html=True)
|
89 |
+
st.markdown(
|
90 |
+
"""
|
91 |
+
<div class='content'>
|
92 |
+
**Sai Kalyan Satwik** is a seasoned cricket enthusiast and tech entrepreneur with over 10 years of experience in the field. Passionate about blending technology with sports, he has developed Cric Metrics to bring the power of AI and data science into cricket analytics. His expertise spans machine learning, software development, and cricket analysis, making Cric Metrics a top-tier analytical platform for cricket lovers worldwide.
|
93 |
+
</div>
|
94 |
+
""",
|
95 |
+
unsafe_allow_html=True,
|
96 |
+
)
|