XPMaster commited on
Commit
248a5eb
·
1 Parent(s): 10673f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -47,13 +47,12 @@ def process_premiums_file(uploaded_file):
47
  # Indicate that the CSV has been processed and we're ready to select columns
48
  st.session_state['select_columns'] = True
49
 
50
- # Button to select premiums, only enabled if a file has been uploaded
51
  with button_col1:
52
- if uploaded_file_premiums is not None:
53
- if st.button(premiumlabel,key=premiumlabel):
54
- process_premiums_file(uploaded_file_premiums)
55
- else:
56
- st.button(premiumlabel, disabled=True,key=premiumlabel+'disabled')
57
 
58
  with button_col2:
59
  if uploaded_file_claims_recoveries is not None:
 
47
  # Indicate that the CSV has been processed and we're ready to select columns
48
  st.session_state['select_columns'] = True
49
 
50
+ # Button to select premiums, disabled if no file has been uploaded
51
  with button_col1:
52
+ # The button is enabled if a file has been uploaded, otherwise it's disabled
53
+ if st.button(premiumlabel, disabled=uploaded_file_premiums is None, key=premiumlabel):
54
+ # If the button is active and clicked, call the callback function
55
+ process_premiums_file(uploaded_file_premiums)
 
56
 
57
  with button_col2:
58
  if uploaded_file_claims_recoveries is not None: