-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
32 lines (23 loc) · 794 Bytes
/
app.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
import streamlit as st
from pathlib import Path
import pandas as pd
import numpy as np
from templates.login import login
from templates.signup import signup
from templates.home_page import home_page
from templates.smile_evaluation import smile_evaluation
# DB Management
import sqlite3
conn = sqlite3.connect('data.db', check_same_thread=False)
c = conn.cursor()
# DB Functions
page_names_to_funcs = ['Main Page', 'Login', 'Sign-up', 'smile-evaluation']
selected_page = st.sidebar.selectbox("Select a page", page_names_to_funcs)
if selected_page == 'Main Page':
home_page()
elif selected_page == 'Login':
a = login(c)
elif selected_page == 'Sign-up':
a = signup(c, conn)
elif selected_page == 'smile-evaluation':
a = smile_evaluation()