Update main.py
Browse files
main.py
CHANGED
@@ -1,22 +1,29 @@
|
|
1 |
import streamlit as st
|
2 |
from loading_file import load_data_file
|
3 |
-
from dataframe import
|
4 |
from search import search_application
|
5 |
|
6 |
-
#
|
7 |
st.title("Visa Application Status Checker")
|
8 |
|
9 |
-
#
|
10 |
-
|
|
|
11 |
|
12 |
-
if
|
13 |
-
|
14 |
-
df = process_dataframe(ods_file)
|
15 |
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
search_application(df)
|
19 |
else:
|
20 |
-
st.error("
|
21 |
else:
|
22 |
-
st.error("
|
|
|
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.")
|