Linh Vuu
added files
c44d66d
raw
history blame
1.72 kB
# Import libraries
import os
import streamlit as st
from PIL import Image
from streamlit_extras.switch_page_button import switch_page
from baam_functions import *
from pathlib import Path
# Set parent direction as current folder
sourceFileDir = Path(os.path.dirname(os.path.abspath(__file__))).parent.absolute()
os.chdir(sourceFileDir)
logo = Image.open('img/logo.png')
st.set_page_config(page_title = "BAAM", page_icon = logo)
def main():
# Get user_dict & verification from previous page
user_dict = st.session_state['user_dict']
verification = st.session_state['verification']
# Get username from user_dict
username = user_dict.get('username', '')
# Header of the page
col1, col2, col3 = st.columns([6,6,2])
with col1:
st.subheader("Welcome " + username)
with col2:
st.write(' ')
with col3:
st.image("img/Standard_Chartered.png", width=100)
# Body of the page
col1, col2 = st.columns(2)
# Bank sidebar
with col1:
st.image("img/bank_sidebar.png")
# Transaction information page to transfer money
with col2:
st.image("img/otp.jpg", width=400)
# Bottom of the page
col1, col2 = st.columns([10,2])
with col1:
st.write(' ')
with col2:
submit_button = st.button("Submit")
# When clicking submit button
if submit_button:
# If fail the user verification logic
# If fail the user verification logic
if not (verification):
# # Check face verification
switch_page("InputImage")
else:
# Open Sent Page
switch_page("Sent ✅")
if __name__ == '__main__':
main()