Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,7 @@ def init_conn():
|
|
| 33 |
gcservice_account, MLB_Data = init_conn()
|
| 34 |
|
| 35 |
@st.cache_data(ttl = 599)
|
| 36 |
-
def init_baselines(
|
| 37 |
sh = gcservice_account.open_by_url(MLB_Data)
|
| 38 |
|
| 39 |
worksheet = sh.worksheet('Hitter_Data (RHP)')
|
|
@@ -109,7 +109,10 @@ with col1:
|
|
| 109 |
pitcher_var1 = st.selectbox("Which pitcher are you looking at?", options = pitcher_rhh['Names'].unique())
|
| 110 |
pitcher_check = pitcher_rhh[pitcher_rhh['Names'] == pitcher_var1]
|
| 111 |
pitcher_hand = pitcher_check['Hand'][0]
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
with col2:
|
| 115 |
st.write(pitcher_hand)
|
|
|
|
| 33 |
gcservice_account, MLB_Data = init_conn()
|
| 34 |
|
| 35 |
@st.cache_data(ttl = 599)
|
| 36 |
+
def init_baselines():
|
| 37 |
sh = gcservice_account.open_by_url(MLB_Data)
|
| 38 |
|
| 39 |
worksheet = sh.worksheet('Hitter_Data (RHP)')
|
|
|
|
| 109 |
pitcher_var1 = st.selectbox("Which pitcher are you looking at?", options = pitcher_rhh['Names'].unique())
|
| 110 |
pitcher_check = pitcher_rhh[pitcher_rhh['Names'] == pitcher_var1]
|
| 111 |
pitcher_hand = pitcher_check['Hand'][0]
|
| 112 |
+
if pitcher_hand == 'RHP':
|
| 113 |
+
hitter_var1 = st.selectbox("What hitter are you looking at?", options = hitter_rhp['Player'].unique())
|
| 114 |
+
else:
|
| 115 |
+
hitter_var1 = st.selectbox("What hitter are you looking at?", options = hitter_lhp['Player'].unique())
|
| 116 |
|
| 117 |
with col2:
|
| 118 |
st.write(pitcher_hand)
|