Sathwikchowdary commited on
Commit
4416c98
Β·
verified Β·
1 Parent(s): e3e769e

Update Home.py

Browse files
Files changed (1) hide show
  1. Home.py +60 -59
Home.py CHANGED
@@ -1,76 +1,77 @@
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
 
1
  import streamlit as st
2
+ import pandas as pd
3
+ import numpy as np
4
 
5
+ st.set_page_config(page_title="Zero to Hero: Master Data Science & ML")
 
 
6
 
7
+ ## CSS Styling for Background Image with Gradient Overlay
8
+ custom_css = """
9
+ <style>
10
+ html, body, [data-testid="stAppViewContainer"] {
11
+ background:
12
+ linear-gradient(
13
+ rgba(0, 0, 0, 0.6),
14
+ rgba(0, 0, 0, 0.6)
15
+ ),
16
+ url("https://www.istockphoto.com/photo/tech-or-space-background-abstract-3d-illustration-gm1367865109-437999705");
17
+ background-size: cover;
18
+ background-attachment: fixed;
19
+ color: white;
20
+ }
21
+ h1 {
22
+ color: Black;
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: Black;'>πŸš€ Zero_to_Hero_in_ML πŸ€–</h1>", unsafe_allow_html=True)
49
 
50
+ # About Section
51
+ st.markdown("<h2 style='color: Black;'>About the App 🌟</h2>", unsafe_allow_html=True)
 
 
 
 
 
 
 
52
  st.markdown(
53
+ "<p style='font-size: 16px; color: White; font-style: italic;'>"
54
+ "This app shares the inspiring journey of an individual who began their data science exploration with no prior knowledge. "
55
+ "It details their path to mastering various aspects of the field, including Machine Learning, Deep Learning, and Generative AI. "
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
+ # Player Information Button
62
+ if st.button("πŸ“Š Player Information"):
63
+ st.markdown(
64
+ "<p style='font-size: 16px; color: White; font-style: italic;'>"
65
+ "This section will provide detailed statistics, insights, and comparisons of cricket players based on AI-driven analysis. "
66
+ "Stay tuned for real-time player data updates!"
67
+ "</p>",
68
+ unsafe_allow_html=True
69
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  # Author Section
72
+ st.markdown("<h2 style='color: Black;'>About the Author πŸ€–</h2>", unsafe_allow_html=True)
73
  st.markdown(
74
+ "<p style='font-size: 16px; color:White; font-style: italic;'>"
75
  "<b>Sai Kalyan Satwik</b>"
76
  "</p>",
77
  unsafe_allow_html=True