-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
46 lines (39 loc) · 1.46 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# main.py
import streamlit as st
import login # Import the login page
import pages.hospital_a
import pages.hospital_b
# Main app logic
def main():
if "logged_in" not in st.session_state:
st.session_state.logged_in = False
if st.session_state.logged_in:
st.sidebar.write("Logged in as user")
# Provide the option to log out
if st.sidebar.button("Logout"):
st.session_state.logged_in = False
st.session_state.page_reloaded = True
# Display page navigation
st.sidebar.title("Navigation")
page = st.sidebar.radio("Select a Hospital:", ("Hospital A", "Hospital B"))
st.title("MediCrypt")
st.write("""
Welcome to MediCrypt!
## Instructions
- **Hospital A**: Enter patient data and upload an image to encrypt the data.
- **Hospital B**: Upload the stego image to decrypt the patient data.
## Features
- Secure communication between hospitals using DNA encryption and image steganography.
- View history of encrypted and decrypted data.
""")
if page == "Analytics":
import pages.statistics
elif page == "Hospital A":
import pages.hospital_a
elif page == "Hospital B":
import pages.hospital_b
else:
# Show login page if not logged in
login.login()
if __name__ == "__main__":
main()