Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,50 +10,50 @@ from langchain_core.output_parsers import StrOutputParser
|
|
| 10 |
|
| 11 |
st.set_page_config(page_title="🏏 Ultimate Cricket Analytics", layout="wide")
|
| 12 |
# Define the URL of the background image (use your own image URL)
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
st.markdown(
|
| 16 |
f"""
|
| 17 |
<style>
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
background-attachment: fixed;
|
| 25 |
-
position: relative;
|
| 26 |
-
}}
|
| 27 |
-
|
| 28 |
-
/* Dark overlay */
|
| 29 |
-
.stApp::before {{
|
| 30 |
-
content: "";
|
| 31 |
-
position: fixed;
|
| 32 |
-
top: 0;
|
| 33 |
-
left: 0;
|
| 34 |
-
width: 100%;
|
| 35 |
-
height: 100%;
|
| 36 |
-
background-color: rgba(0, 0, 0, 0.4); /* 40% black overlay */
|
| 37 |
-
z-index: 0;
|
| 38 |
-
}}
|
| 39 |
-
|
| 40 |
-
/* Ensure all content is above the overlay */
|
| 41 |
-
.block-container {{
|
| 42 |
-
position: relative;
|
| 43 |
-
z-index: 1;
|
| 44 |
-
}}
|
| 45 |
-
|
| 46 |
-
/* Optional: style markdown globally */
|
| 47 |
-
.stMarkdown {{
|
| 48 |
-
color: white !important;
|
| 49 |
-
font-size: 20px !important;
|
| 50 |
-
}}
|
| 51 |
</style>
|
| 52 |
""",
|
| 53 |
unsafe_allow_html=True
|
| 54 |
)
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
|
| 59 |
# Create a folder to save CSVs if not exists
|
|
|
|
| 10 |
|
| 11 |
st.set_page_config(page_title="🏏 Ultimate Cricket Analytics", layout="wide")
|
| 12 |
# Define the URL of the background image (use your own image URL)
|
| 13 |
+
from PIL import Image
|
| 14 |
+
|
| 15 |
+
# Set up Streamlit page config
|
| 16 |
+
st.set_page_config(page_title="Ultimate Cricket Analytics Dashboard", layout="wide")
|
| 17 |
+
|
| 18 |
+
# ---- Background Styling ----
|
| 19 |
+
background_image_url = "https://cdn.wallpapersafari.com/54/80/xOOc4x.jpg" # You can replace with any other beautiful cricket image
|
| 20 |
|
| 21 |
st.markdown(
|
| 22 |
f"""
|
| 23 |
<style>
|
| 24 |
+
.stApp {{
|
| 25 |
+
background-image: url("{background_image_url}");
|
| 26 |
+
background-size: cover;
|
| 27 |
+
background-repeat: no-repeat;
|
| 28 |
+
background-attachment: fixed;
|
| 29 |
+
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
</style>
|
| 31 |
""",
|
| 32 |
unsafe_allow_html=True
|
| 33 |
)
|
| 34 |
|
| 35 |
+
# ---- Sidebar ----
|
| 36 |
+
option = st.sidebar.selectbox(
|
| 37 |
+
"Choose Option",
|
| 38 |
+
["Main Page", "Team Info", "Team Stats Comparison", "Player Stats", "Player Comparison"],
|
| 39 |
+
index=0 # Set "Main Page" as the default option
|
| 40 |
+
)
|
| 41 |
+
|
| 42 |
+
# ---- Main Page ----
|
| 43 |
+
if option == "Main Page":
|
| 44 |
+
st.markdown(
|
| 45 |
+
"""
|
| 46 |
+
<div style="text-align: center; padding-top: 100px;">
|
| 47 |
+
<h1 style="font-size: 64px; color: white; font-weight: bold;">🏏 Ultimate Cricket Analytics</h1>
|
| 48 |
+
<h3 style="font-size: 28px; color: white;">Dive deep into the world of cricket with powerful data-driven insights!</h3>
|
| 49 |
+
<br>
|
| 50 |
+
<img src="https://media.giphy.com/media/Y4pAQv58ETJgRwoLxj/giphy.gif" width="400">
|
| 51 |
+
<br><br>
|
| 52 |
+
<p style="font-size: 20px; color: white;">Select an option from the sidebar to begin your cricket journey! 🧠📊</p>
|
| 53 |
+
</div>
|
| 54 |
+
""",
|
| 55 |
+
unsafe_allow_html=True
|
| 56 |
+
)
|
| 57 |
|
| 58 |
|
| 59 |
# Create a folder to save CSVs if not exists
|