Spaces:
Runtime error
Runtime error
tracinginsights
commited on
Commit
·
de16828
1
Parent(s):
34e3b5f
Update app.py
Browse files
app.py
CHANGED
@@ -22,28 +22,28 @@ if not os.path.exists('repo_directory'):
|
|
22 |
Repo.clone_from(f'https://tracinginsights:{GITHUB_PAT}@github.com/TracingInsights/F1_app.git', 'repo_directory' )
|
23 |
|
24 |
|
25 |
-
import streamlit as st
|
26 |
-
from repo_directory.main import get_laps_with_weather
|
27 |
|
28 |
-
import pandas as pd
|
29 |
|
30 |
-
YEAR_SELECTED = st.selectbox(
|
31 |
-
|
32 |
-
|
33 |
|
34 |
-
RACE_SELECTED = st.selectbox(
|
35 |
-
|
36 |
-
|
37 |
|
38 |
-
SESSION_SELECTED = st.selectbox(
|
39 |
-
|
40 |
-
|
41 |
|
42 |
-
laps_with_weather, weather_data, f1session = get_laps_with_weather(YEAR_SELECTED, RACE_SELECTED, SESSION_SELECTED)
|
43 |
-
laps_with_weather.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
44 |
-
st.dataframe(pd.read_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv'))
|
45 |
-
with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv') as f:
|
46 |
-
|
47 |
|
48 |
|
49 |
|
|
|
22 |
Repo.clone_from(f'https://tracinginsights:{GITHUB_PAT}@github.com/TracingInsights/F1_app.git', 'repo_directory' )
|
23 |
|
24 |
|
25 |
+
# import streamlit as st
|
26 |
+
# from repo_directory.main import get_laps_with_weather
|
27 |
|
28 |
+
# import pandas as pd
|
29 |
|
30 |
+
# YEAR_SELECTED = st.selectbox(
|
31 |
+
# 'Select Year',
|
32 |
+
# (2023, 2022, 2021, 2020, 2019, 2018))
|
33 |
|
34 |
+
# RACE_SELECTED = st.selectbox(
|
35 |
+
# 'Select Race',
|
36 |
+
# (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23))
|
37 |
|
38 |
+
# SESSION_SELECTED = st.selectbox(
|
39 |
+
# 'Select Session',
|
40 |
+
# ('FP1', 'FP2', 'FP3', 'Q', 'SQ', 'R'))
|
41 |
|
42 |
+
# laps_with_weather, weather_data, f1session = get_laps_with_weather(YEAR_SELECTED, RACE_SELECTED, SESSION_SELECTED)
|
43 |
+
# laps_with_weather.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
44 |
+
# st.dataframe(pd.read_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv'))
|
45 |
+
# with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv') as f:
|
46 |
+
# st.download_button('Click to Download LapTimes Data', f, file_name=f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
47 |
|
48 |
|
49 |
|