Spaces:
Running
Running
import streamlit as st | |
from repo_directory import Laps_In_Top_10 | |
from repo_directory import button | |
import pandas as pd | |
YEAR_SELECTED = st.selectbox( | |
'Select Year', | |
(2024,2023, 2022, 2021, 2020, 2019, 2018)) | |
race_names_df, lap_times_df, teams_df, results_df, pit_stops_df, drivers_df = Laps_In_Top_10.load_data() | |
events = Laps_In_Top_10.get_events(YEAR_SELECTED, race_names_df) | |
RACE_SELECTED = st.selectbox( | |
'Select Race', | |
events.tolist()) | |
try: | |
Laps_In_Top_10.plot(YEAR_SELECTED, RACE_SELECTED, race_names_df, lap_times_df, teams_df, results_df, pit_stops_df, drivers_df) | |
except: | |
pass |