-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
41 lines (31 loc) · 1008 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
37
38
39
40
41
import streamlit as st
from mongo import mongo
from postgres import postgres
# st.set_page_config(initial_sidebar_state="collapsed")
def header():
author = """
made by [Kosarevsky Dmitry](https://github.com/dKosarevsky)
for [DB](https://github.com/dKosarevsky/db_cp) course project
in [BMSTU](https://bmstu.ru)
"""
st.header("МГТУ им. Баумана. Кафедра ИУ7")
st.markdown("**Курс:** Базы данных")
st.markdown("**Преподаватель:** Павлюк А.А.")
st.markdown("**Студент:** Косаревский Д.П.")
st.sidebar.image('logo.png', width=300)
st.sidebar.markdown(author)
def main():
header()
db = st.sidebar.radio(
"Выберите тип БД:", (
"1. Postgres.",
"2. Mongo.",
),
index=0
)
if db[:1] == "1":
postgres.main()
elif db[:1] == "2":
mongo.main()
if __name__ == "__main__":
main()