Create main.py
Browse files
main.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.")
|