Spaces:
Sleeping
Sleeping
Commit
·
a12c0b8
1
Parent(s):
3a3e679
feat: add main menu options and scripts
Browse files
app.py
CHANGED
@@ -39,16 +39,7 @@ def load_database():
|
|
39 |
return db_conn
|
40 |
|
41 |
|
42 |
-
|
43 |
-
def load_database2():
|
44 |
-
db_conn = sqlite3.connect("resources/ai_app.db")
|
45 |
-
with open("resources/schema.sql", "r") as f:
|
46 |
-
db_conn.executescript(f.read())
|
47 |
-
|
48 |
-
return db_conn
|
49 |
-
|
50 |
-
|
51 |
-
db_conn = load_database2()
|
52 |
|
53 |
|
54 |
def execute_sql(sql_query):
|
@@ -407,6 +398,7 @@ selected_page = st.sidebar.radio("Go to", pages)
|
|
407 |
if st.sidebar.button("Clear All"):
|
408 |
# Clears all st.cache_resource caches:
|
409 |
st.cache_resource.clear()
|
|
|
410 |
|
411 |
# Show the appropriate page based on the selection
|
412 |
if selected_page == "Introduction":
|
|
|
39 |
return db_conn
|
40 |
|
41 |
|
42 |
+
db_conn = load_database()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
|
45 |
def execute_sql(sql_query):
|
|
|
398 |
if st.sidebar.button("Clear All"):
|
399 |
# Clears all st.cache_resource caches:
|
400 |
st.cache_resource.clear()
|
401 |
+
st.rerun()
|
402 |
|
403 |
# Show the appropriate page based on the selection
|
404 |
if selected_page == "Introduction":
|