Sathwikchowdary commited on
Commit
f80ff0a
Β·
verified Β·
1 Parent(s): 08af828

Update Home.py

Browse files
Files changed (1) hide show
  1. Home.py +4 -31
Home.py CHANGED
@@ -1,10 +1,6 @@
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
  """
@@ -17,11 +13,6 @@ st.markdown(
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
 
@@ -34,13 +25,6 @@ st.markdown(
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)
@@ -51,21 +35,10 @@ st.markdown(
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)
 
1
  import streamlit as st
2
  from streamlit_extras.switch_page_button import switch_page
3
 
 
 
 
 
4
  # Custom styles
5
  st.markdown(
6
  """
 
13
  unsafe_allow_html=True,
14
  )
15
 
 
 
 
 
 
16
  # App Header
17
  st.markdown("<h1 style='text-align: center; color: red;'>🏏 Cric Metrics - AI-Powered Cricket Insights 🏏</h1>", unsafe_allow_html=True)
18
 
 
25
  "</p>",
26
  unsafe_allow_html=True
27
  )
 
 
 
 
 
 
 
28
 
29
  # About Cric Metrics
30
  st.markdown("<h2 style='color: blue;'>What is Cric Metrics? πŸ“Š</h2>", unsafe_allow_html=True)
 
35
  "</p>",
36
  unsafe_allow_html=True
37
  )
38
+
39
+ # Player Information Button
40
+ if st.button("πŸ“Š Player Information"):
41
+ switch_page("player_info") # This navigates to pages/player_info.py
 
 
 
 
 
 
 
 
 
 
 
42
 
43
  # Author Section
44
  st.markdown("<h2 style='color: green;'>About the Author πŸ‘¨β€πŸ’»</h2>", unsafe_allow_html=True)