Spaces:
Sleeping
Sleeping
File size: 1,113 Bytes
6c0ac32 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import streamlit as st
# Set page title
st.title("Cricket Scoreboard")
# Input fields for teams
team1 = st.text_input("Enter Team 1 Name", "Team A")
team2 = st.text_input("Enter Team 2 Name", "Team B")
# Score tracking
score1 = st.number_input(f"{team1} Score", min_value=0, value=0, step=1)
wickets1 = st.number_input(f"{team1} Wickets", min_value=0, max_value=10, value=0, step=1)
overs1 = st.number_input(f"{team1} Overs", min_value=0.0, max_value=50.0, value=0.0, step=0.1)
score2 = st.number_input(f"{team2} Score", min_value=0, value=0, step=1)
wickets2 = st.number_input(f"{team2} Wickets", min_value=0, max_value=10, value=0, step=1)
overs2 = st.number_input(f"{team2} Overs", min_value=0.0, max_value=50.0, value=0.0, step=0.1)
# Display scoreboard
st.subheader("Live Score Update")
st.write(f"**{team1}**: {score1}/{wickets1} in {overs1} overs")
st.write(f"**{team2}**: {score2}/{wickets2} in {overs2} overs")
# Match Status
match_status = st.text_area("Match Status", "Enter match summary or status here...")
# Button to reset scores
if st.button("Reset Scoreboard"):
st.experimental_rerun() |