menikev commited on
Commit
5ecc9ee
1 Parent(s): b7e92a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -10
app.py CHANGED
@@ -147,14 +147,13 @@ def create_channel_discrimination_chart(df):
147
  def render_dashboard(page, df_filtered):
148
  if page == "Overview":
149
  st.title("Overview Dashboard")
150
- # Create 2x2 grid for overview visualizations
151
- col1, col2 = st.beta_columns(2)
152
  with col1:
153
  st.plotly_chart(create_pie_chart(df_filtered, 'Domain', 'Distribution of Domains'))
154
  with col2:
155
  st.plotly_chart(create_gender_ethnicity_distribution_chart(df_filtered))
156
 
157
- col3, col4 = st.beta_columns(2)
158
  with col3:
159
  st.plotly_chart(create_sentiment_distribution_chart(df_filtered))
160
  with col4:
@@ -162,21 +161,19 @@ def render_dashboard(page, df_filtered):
162
 
163
  elif page == "Sentiment Analysis":
164
  st.title("Sentiment Analysis Dashboard")
165
- # Create visualizations for the sentiment analysis page
166
- col1, col2 = st.beta_columns(2)
167
  with col1:
168
  st.plotly_chart(create_sentiment_distribution_chart(df_filtered))
169
  with col2:
170
  st.plotly_chart(create_top_negative_sentiment_domains_chart(df_filtered))
171
 
172
- col3, col4 = st.beta_columns(2)
173
  with col3:
174
  st.plotly_chart(create_key_phrases_negative_sentiment_chart(df_filtered))
175
 
176
  elif page == "Discrimination Analysis":
177
  st.title("Discrimination Analysis Dashboard")
178
- # Create visualizations for the discrimination analysis page
179
- col1, col2 = st.beta_columns(2)
180
  with col1:
181
  st.plotly_chart(create_prevalence_discriminatory_content_chart(df_filtered))
182
  with col2:
@@ -184,7 +181,6 @@ def render_dashboard(page, df_filtered):
184
 
185
  elif page == "Channel Analysis":
186
  st.title("Channel Analysis Dashboard")
187
- # Create visualizations for the channel analysis page
188
  col1, col2 = st.columns(2)
189
  with col1:
190
  st.plotly_chart(create_channel_sentiment_over_time_chart(df_filtered))
@@ -192,4 +188,4 @@ def render_dashboard(page, df_filtered):
192
  st.plotly_chart(create_channel_discrimination_chart(df_filtered))
193
 
194
  # Render the selected dashboard page
195
- render_dashboard(page, df_filtered)
 
147
  def render_dashboard(page, df_filtered):
148
  if page == "Overview":
149
  st.title("Overview Dashboard")
150
+ col1, col2 = st.columns(2)
 
151
  with col1:
152
  st.plotly_chart(create_pie_chart(df_filtered, 'Domain', 'Distribution of Domains'))
153
  with col2:
154
  st.plotly_chart(create_gender_ethnicity_distribution_chart(df_filtered))
155
 
156
+ col3, col4 = st.columns(2)
157
  with col3:
158
  st.plotly_chart(create_sentiment_distribution_chart(df_filtered))
159
  with col4:
 
161
 
162
  elif page == "Sentiment Analysis":
163
  st.title("Sentiment Analysis Dashboard")
164
+ col1, col2 = st.columns(2)
 
165
  with col1:
166
  st.plotly_chart(create_sentiment_distribution_chart(df_filtered))
167
  with col2:
168
  st.plotly_chart(create_top_negative_sentiment_domains_chart(df_filtered))
169
 
170
+ col3, col4 = st.columns(2)
171
  with col3:
172
  st.plotly_chart(create_key_phrases_negative_sentiment_chart(df_filtered))
173
 
174
  elif page == "Discrimination Analysis":
175
  st.title("Discrimination Analysis Dashboard")
176
+ col1, col2 = st.columns(2)
 
177
  with col1:
178
  st.plotly_chart(create_prevalence_discriminatory_content_chart(df_filtered))
179
  with col2:
 
181
 
182
  elif page == "Channel Analysis":
183
  st.title("Channel Analysis Dashboard")
 
184
  col1, col2 = st.columns(2)
185
  with col1:
186
  st.plotly_chart(create_channel_sentiment_over_time_chart(df_filtered))
 
188
  st.plotly_chart(create_channel_discrimination_chart(df_filtered))
189
 
190
  # Render the selected dashboard page
191
+ render_dashboard(page, df_filtered)