Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pandas as pd
|
| 3 |
+
|
| 4 |
+
### streamlit run c:/Users/karim/OneDrive/Documents/Python/webapp/app.py
|
| 5 |
+
|
| 6 |
+
st.title("Topic Modeling to determine climate anxiety among youth")
|
| 7 |
+
|
| 8 |
+
st.header("Our mission and plan", divider='red')
|
| 9 |
+
|
| 10 |
+
st.markdown("We're using BERTopic and LDA as a baseline model")
|
| 11 |
+
|
| 12 |
+
page = st.selectbox('Select a page', ['modeling', 'LDA'])
|
| 13 |
+
|
| 14 |
+
import streamlit as st
|
| 15 |
+
|
| 16 |
+
# Create a dropdown in the sidebar for selecting page categories
|
| 17 |
+
category = st.sidebar.selectbox('Choose a category', ['General Info', 'Contact Info'])
|
| 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
|