XPMaster commited on
Commit
ec609f8
·
1 Parent(s): 223de25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -28
app.py CHANGED
@@ -1,34 +1,34 @@
1
  import streamlit as st
2
 
3
  def main():
4
- # Create a container to hold the columns
5
- container = st.container()
6
-
7
- # Using a with statement ensures that the columns are at the same level
8
- with container:
9
- # Create three columns for the drag and drop areas
10
- col1, col2, col3 = st.columns(3)
11
-
12
- with col1:
13
- st.header("Premium")
14
- premium_file = st.file_uploader("Drop your Premium CSV here", type=['csv'], key="premium")
15
- if premium_file is not None:
16
- # Button for next step of Premium
17
- st.button("Proceed with Premium Analysis", key="premium_proceed")
18
-
19
- with col2:
20
- st.header("Incurred Claims & Recoveries Data")
21
- claims_data_file = st.file_uploader("Drop your Claims & Recoveries CSV here", type=['csv'], key="claims_data")
22
- if claims_data_file is not None:
23
- # Button for next step of Claims Data
24
- st.button("Proceed with Claims Data Analysis", key="claims_data_proceed")
25
-
26
- with col3:
27
- st.header("Claims Count")
28
- claims_count_file = st.file_uploader("Drop your Claims Count CSV here", type=['csv'], key="claims_count")
29
- if claims_count_file is not None:
30
- # Button for next step of Claims Count
31
- st.button("Proceed with Claims Count Analysis", key="claims_count_proceed")
32
 
33
  if __name__ == "__main__":
34
  main()
 
1
  import streamlit as st
2
 
3
  def main():
4
+ st.title("Data Upload for Analysis")
5
+
6
+ # Set the layout for file uploaders
7
+ layout = st.columns(3)
8
+ # Initialize a variable for each file to None
9
+ premium_file = claims_data_file = claims_count_file = None
10
+
11
+ with layout[0]:
12
+ st.header("Premium")
13
+ premium_file = st.file_uploader("Drop your Premium CSV here", type=['csv'], key="premium")
14
+
15
+ with layout[1]:
16
+ st.header("Incurred Claims & Recoveries Data")
17
+ claims_data_file = st.file_uploader("Drop your Claims & Recoveries CSV here", type=['csv'], key="claims_data")
18
+
19
+ with layout[2]:
20
+ st.header("Claims Count")
21
+ claims_count_file = st.file_uploader("Drop your Claims Count CSV here", type=['csv'], key="claims_count")
22
+
23
+ # Check if files are uploaded and if so, display the proceed buttons
24
+ if premium_file is not None:
25
+ st.button("Proceed with Premium Analysis", key="premium_proceed")
26
+
27
+ if claims_data_file is not None:
28
+ st.button("Proceed with Claims Data Analysis", key="claims_data_proceed")
29
+
30
+ if claims_count_file is not None:
31
+ st.button("Proceed with Claims Count Analysis", key="claims_count_proceed")
32
 
33
  if __name__ == "__main__":
34
  main()