-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.py
36 lines (29 loc) · 1016 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
33
34
35
36
import sys
import streamlit as st
for path in ["src/frontend", "src/backend"]:
if path not in sys.path:
sys.path.append(path)
from st_docu_talk import StreamlitDocuTalk # noqa: E402
if "app" not in st.session_state:
st.session_state["app"] = StreamlitDocuTalk()
st.rerun()
app : StreamlitDocuTalk = st.session_state["app"]
if app.auth.logged_in is False:
pg = st.navigation(
[
st.Page("src/frontend/pages/auth.py", title="Auth")
],
position="hidden"
)
else:
pg = st.navigation(
[
st.Page("src/frontend/pages/home.py", title="Home", default=True),
st.Page("src/frontend/pages/chatbot.py", title="Docu Talk"),
st.Page("src/frontend/pages/create-chatbot.py", title="Create Chat Bot"),
st.Page("src/frontend/pages/settings.py", title="Settings"),
st.Page("src/frontend/pages/chatbot-settings.py", title="Chat Bot Settings")
],
position="hidden"
)
pg.run()