Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,34 +1,54 @@
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
|
4 |
-
|
5 |
|
6 |
-
st.
|
|
|
7 |
|
8 |
-
|
|
|
9 |
|
10 |
-
|
|
|
11 |
|
12 |
-
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
# Display pages based on selected category
|
20 |
-
if category == 'General Info':
|
21 |
-
page = st.sidebar.selectbox('Select a page', ['1_sentiment_analysis'])
|
22 |
-
if page == '1_sentiment_analysis':
|
23 |
-
st.write('1_sentiment_analysis')
|
24 |
-
# Add content specific to the Home page
|
25 |
-
|
26 |
-
|
27 |
-
elif category == 'Contact Info':
|
28 |
-
page = st.sidebar.selectbox('Select a page', ['2_modeling', '3_LDA'])
|
29 |
-
if page == '2_modeling':
|
30 |
-
st.write('2_modeling:')
|
31 |
-
# Add content specific to the Contact page
|
32 |
-
elif page == '3_LDA':
|
33 |
-
st.write('3_LDA!')
|
34 |
-
# Add content specific to the About page
|
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
|
4 |
+
st.title("Topic Modeling to Determine Climate Anxiety Among Youth")
|
5 |
|
6 |
+
st.header("Our Mission and Plan", divider='red')
|
7 |
+
st.markdown("We're using **BERTopic** and **LDA** as baseline models.")
|
8 |
|
9 |
+
if "page" not in st.session_state:
|
10 |
+
st.session_state.page = "Home"
|
11 |
|
12 |
+
def navigate_to(page):
|
13 |
+
st.session_state.page = page
|
14 |
|
15 |
+
st.subheader("Select a Section:")
|
16 |
+
col1, col2, col3, col4 = st.columns(4)
|
17 |
|
18 |
+
with col1:
|
19 |
+
if st.button("Home"):
|
20 |
+
navigate_to("Home")
|
21 |
+
|
22 |
+
with col2:
|
23 |
+
if st.button("Sentiment Analysis"):
|
24 |
+
navigate_to("Sentiment Analysis")
|
25 |
+
|
26 |
+
with col3:
|
27 |
+
if st.button("Topic Modelling"):
|
28 |
+
navigate_to("Topic Modelling")
|
29 |
+
|
30 |
+
with col4:
|
31 |
+
if st.button("LDA"):
|
32 |
+
navigate_to("LDA")
|
33 |
+
|
34 |
+
st.divider()
|
35 |
+
|
36 |
+
if st.session_state.page == "Home":
|
37 |
+
st.header("Home Page")
|
38 |
+
|
39 |
+
elif st.session_state.page == "Sentiment Analysis":
|
40 |
+
st.header("Sentiment Analysis")
|
41 |
+
|
42 |
+
elif st.session_state.page == "Topic Modelling":
|
43 |
+
st.header("Topic Modelling")
|
44 |
+
|
45 |
+
elif st.session_state.page == "LDA":
|
46 |
+
st.header("Latent Dirichlet Allocation (LDA)")
|
47 |
+
|
48 |
+
st.divider()
|
49 |
+
|
50 |
+
if st.button("Contact Info"):
|
51 |
+
st.session_state.page = "Contact Info"
|
52 |
|
53 |
+
if st.session_state.page == "Contact Info":
|
54 |
+
st.header("Contact Information")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|