Spaces:
Build error
Build error
James McCool
commited on
Commit
·
fa76eda
1
Parent(s):
f9e2783
This is a script error, not a display error
Browse files
app.py
CHANGED
|
@@ -2001,8 +2001,6 @@ if selected_tab == 'Manage Portfolio':
|
|
| 2001 |
# Load and process the origin portfolio
|
| 2002 |
initial_frame = pd.read_parquet(io.BytesIO(st.session_state['origin_portfolio']))
|
| 2003 |
st.session_state['player_columns'] = [col for col in initial_frame.columns if col not in excluded_cols]
|
| 2004 |
-
|
| 2005 |
-
print(initial_frame.head(10))
|
| 2006 |
|
| 2007 |
processed_frame = calculate_lineup_metrics(
|
| 2008 |
initial_frame,
|
|
@@ -2012,17 +2010,13 @@ if selected_tab == 'Manage Portfolio':
|
|
| 2012 |
sport_var,
|
| 2013 |
st.session_state['portfolio_inc_proj'] if 'stack_dict' in st.session_state else None
|
| 2014 |
)
|
| 2015 |
-
|
| 2016 |
|
| 2017 |
if 'stack_dict' in st.session_state:
|
| 2018 |
processed_frame['Stack'] = processed_frame.index.map(st.session_state['stack_dict'])
|
| 2019 |
processed_frame['Size'] = processed_frame.index.map(st.session_state['size_dict'])
|
| 2020 |
|
| 2021 |
-
print(processed_frame.head(10))
|
| 2022 |
-
|
| 2023 |
final_base_frame = predict_dupes(processed_frame, st.session_state['map_dict'], site_var, type_var, Contest_Size, strength_var, sport_var, salary_max)
|
| 2024 |
-
|
| 2025 |
-
print(final_base_frame.head(10))
|
| 2026 |
|
| 2027 |
save_base_frame('Default', final_base_frame)
|
| 2028 |
st.session_state['working_frame'] = final_base_frame.copy()
|
|
|
|
| 2001 |
# Load and process the origin portfolio
|
| 2002 |
initial_frame = pd.read_parquet(io.BytesIO(st.session_state['origin_portfolio']))
|
| 2003 |
st.session_state['player_columns'] = [col for col in initial_frame.columns if col not in excluded_cols]
|
|
|
|
|
|
|
| 2004 |
|
| 2005 |
processed_frame = calculate_lineup_metrics(
|
| 2006 |
initial_frame,
|
|
|
|
| 2010 |
sport_var,
|
| 2011 |
st.session_state['portfolio_inc_proj'] if 'stack_dict' in st.session_state else None
|
| 2012 |
)
|
| 2013 |
+
processed_frame = processed_frame[processed_frame['salary'] <= salary_max]
|
| 2014 |
|
| 2015 |
if 'stack_dict' in st.session_state:
|
| 2016 |
processed_frame['Stack'] = processed_frame.index.map(st.session_state['stack_dict'])
|
| 2017 |
processed_frame['Size'] = processed_frame.index.map(st.session_state['size_dict'])
|
| 2018 |
|
|
|
|
|
|
|
| 2019 |
final_base_frame = predict_dupes(processed_frame, st.session_state['map_dict'], site_var, type_var, Contest_Size, strength_var, sport_var, salary_max)
|
|
|
|
|
|
|
| 2020 |
|
| 2021 |
save_base_frame('Default', final_base_frame)
|
| 2022 |
st.session_state['working_frame'] = final_base_frame.copy()
|