James McCool commited on
Commit
f099cf5
·
1 Parent(s): 41768e4

Enhance contest file upload feedback in app.py

Browse files

- Added a blank line for improved readability in the contest file section.
- Displayed the first 10 rows of the uploaded contest file from the session state, providing users with immediate visibility of their data.
- Maintained existing functionality for loading contest data while enhancing user experience during file uploads.

Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -68,6 +68,7 @@ with tab1:
68
  col1, col2 = st.columns(2)
69
 
70
  with col1:
 
71
  st.subheader("Contest File")
72
  st.info("Go ahead and upload a Contest file here. Only include player columns and an optional 'Stack' column if you are playing MLB.")
73
  if parse_type == 'DB Search':
@@ -92,7 +93,9 @@ with tab1:
92
  st.session_state['Contest_file_helper'] = grab_contest_data(sport_select, name_parse.iloc[0], contest_id_map, date_select)
93
  else:
94
  pass
 
95
  if 'Contest_file' in st.session_state:
 
96
  if 'Contest_file_helper' in st.session_state:
97
  st.session_state['Contest'], st.session_state['ownership_df'], st.session_state['actual_df'], st.session_state['salary_df'], st.session_state['team_df'], st.session_state['pos_df'], st.session_state['entry_list'], check_lineups = load_contest_file(st.session_state['Contest_file'], st.session_state['Contest_file_helper'], sport_select)
98
  else:
 
68
  col1, col2 = st.columns(2)
69
 
70
  with col1:
71
+
72
  st.subheader("Contest File")
73
  st.info("Go ahead and upload a Contest file here. Only include player columns and an optional 'Stack' column if you are playing MLB.")
74
  if parse_type == 'DB Search':
 
93
  st.session_state['Contest_file_helper'] = grab_contest_data(sport_select, name_parse.iloc[0], contest_id_map, date_select)
94
  else:
95
  pass
96
+
97
  if 'Contest_file' in st.session_state:
98
+ st.write(st.session_state['Contest_file'].head(10))
99
  if 'Contest_file_helper' in st.session_state:
100
  st.session_state['Contest'], st.session_state['ownership_df'], st.session_state['actual_df'], st.session_state['salary_df'], st.session_state['team_df'], st.session_state['pos_df'], st.session_state['entry_list'], check_lineups = load_contest_file(st.session_state['Contest_file'], st.session_state['Contest_file_helper'], sport_select)
101
  else: