Sathwikchowdary commited on
Commit
30fe6c5
Β·
verified Β·
1 Parent(s): 9730a9f

Update pages/1player_information.py

Browse files
Files changed (1) hide show
  1. pages/1player_information.py +30 -1
pages/1player_information.py CHANGED
@@ -5,6 +5,34 @@ import seaborn as sns
5
 
6
  # Set page configuration
7
  st.set_page_config(page_title="Cricket Legends: Career Insights", layout="wide")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  # App Title
9
  st.title("🏏 Cricket Legends: Career Insights & Visualizations")
10
 
@@ -21,7 +49,7 @@ if player_input:
21
  if selected_player in df["Player"].values:
22
  player_data = df[df["Player"] == selected_player].iloc[0]
23
 
24
- # Pie Chart - Matches Played Across Formats
25
  matches = [
26
  player_data["Matches_Test"],
27
  player_data["Matches_ODI"],
@@ -61,5 +89,6 @@ if player_input:
61
  ax.set_ylabel("Batting Average", fontsize=12)
62
  ax.set_title(f"Batting Average of {selected_player}", fontsize=14)
63
  st.pyplot(fig)
 
64
  else:
65
  st.error("🚨 Player not found! Please enter a valid player name.")
 
5
 
6
  # Set page configuration
7
  st.set_page_config(page_title="Cricket Legends: Career Insights", layout="wide")
8
+
9
+ # Light-Themed Background with Light Blue Color
10
+ page_bg = """
11
+ <style>
12
+ body {
13
+ background-color: #E3F2FD;
14
+ }
15
+ [data-testid="stAppViewContainer"] {
16
+ background-color: #E3F2FD;
17
+ }
18
+ [data-testid="stSidebar"] {
19
+ background-color: #ffffff;
20
+ border-right: 1px solid #ddd;
21
+ }
22
+ h1, h2, h3, h4, h5, h6 {
23
+ color: #333333 !important;
24
+ }
25
+ .stTextInput>div>div>input {
26
+ background-color: white;
27
+ color: black;
28
+ border-radius: 5px;
29
+ padding: 10px;
30
+ border: 1px solid #ccc;
31
+ }
32
+ </style>
33
+ """
34
+ st.markdown(page_bg, unsafe_allow_html=True)
35
+
36
  # App Title
37
  st.title("🏏 Cricket Legends: Career Insights & Visualizations")
38
 
 
49
  if selected_player in df["Player"].values:
50
  player_data = df[df["Player"] == selected_player].iloc[0]
51
 
52
+ # Pie Chart - Matches Played Across Formats
53
  matches = [
54
  player_data["Matches_Test"],
55
  player_data["Matches_ODI"],
 
89
  ax.set_ylabel("Batting Average", fontsize=12)
90
  ax.set_title(f"Batting Average of {selected_player}", fontsize=14)
91
  st.pyplot(fig)
92
+
93
  else:
94
  st.error("🚨 Player not found! Please enter a valid player name.")