Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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,
|
| 51 |
with button_col1:
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 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:
|