SR05 commited on
Commit
40b182b
·
verified ·
1 Parent(s): 48cc129
Files changed (1) hide show
  1. main.py +18 -11
main.py CHANGED
@@ -1,22 +1,29 @@
1
  import streamlit as st
2
  from loading_file import load_data_file
3
- from dataframe import process_dataframe
4
  from search import search_application
5
 
6
- # Title for the app
7
  st.title("Visa Application Status Checker")
8
 
9
- # Load data using the loading_file module
10
- ods_file, cached_file_name = load_data_file()
 
11
 
12
- if ods_file:
13
- # Process the data using the dataframe module
14
- df = process_dataframe(ods_file)
15
 
16
- if not df.empty:
17
- # Call the search logic from search module
 
 
 
 
 
 
 
18
  search_application(df)
19
  else:
20
- st.error("The processed data is empty. Please check the input file.")
21
  else:
22
- st.error("Failed to load data. Please check the file source.")
 
1
  import streamlit as st
2
  from loading_file import load_data_file
3
+ from dataframe import prepare_dataframe
4
  from search import search_application
5
 
6
+ # Streamlit app title
7
  st.title("Visa Application Status Checker")
8
 
9
+ # Step 1: Load the data
10
+ st.subheader("Step 1: Loading the Data")
11
+ data_file, file_name = load_data_file()
12
 
13
+ if data_file:
14
+ st.success(f"File '{file_name}' loaded successfully!")
 
15
 
16
+ # Step 2: Prepare the DataFrame
17
+ st.subheader("Step 2: Preparing the DataFrame")
18
+ df = prepare_dataframe(data_file)
19
+
20
+ if df is not None:
21
+ st.success("DataFrame is ready for searching!")
22
+
23
+ # Step 3: Search for the Application Number
24
+ st.subheader("Step 3: Search Application Status")
25
  search_application(df)
26
  else:
27
+ st.error("Error preparing the DataFrame.")
28
  else:
29
+ st.error("No file data available.")