ProfessorLeVesseur commited on
Commit
7be86a5
1 Parent(s): 3040988

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -17
app.py CHANGED
@@ -224,30 +224,31 @@ def main():
224
  st.write(student_metrics_df)
225
 
226
  # Visualization for Student Metrics
227
- # student_metrics_fig = plot_student_metrics(student_metrics_df)
228
 
229
  # Compute Student Metric Averages
230
  attendance_avg_stats, engagement_avg_stats = compute_average_metrics(student_metrics_df)
231
 
232
- # Two-column layout for the visualization and intervention frequency
233
- col1, col2 = st.columns([3, 1]) # Set the column width ratio
234
 
235
- with col1:
236
- student_metrics_fig = plot_student_metrics(student_metrics_df, attendance_avg_stats, engagement_avg_stats)
237
 
238
- with col2:
239
- # Display the "Attendance Average (%)" text and value
240
- st.markdown("<h4 style='color: #358E66;'>Attendance Average (%)</h4>", unsafe_allow_html=True)
241
- if attendance_avg_stats is not None:
242
- st.markdown(f"<h2 style='color: #358E66; '>{attendance_avg_stats}%</h2>", unsafe_allow_html=True)
243
- else: afe_allow_html=True)
 
244
 
245
- # Display the "Engagement Average (%)" text and value
246
- st.markdown("<h4 style='color: #358E66; margin-top: 0px; margin-bottom: 0px;'>Engagement Average (%)</h4>", unsafe_allow_html=True)
247
- if engagement_avg_stats is not None:
248
- st.markdown(f"<h2 style='color: #358E66; margin-top: 0px; margin-bottom: 0px;'>{engagement_avg_stats}%</h2>", unsafe_allow_html=True)
249
- else:
250
- st.markdown("<h2 style='color: #358E66;'>N/A</h2>", unsafe_allow_html=True)
251
 
252
  # Add download button for Student Metrics chart
253
  download_chart(student_metrics_fig, "student_metrics_chart.png")
 
224
  st.write(student_metrics_df)
225
 
226
  # Visualization for Student Metrics
227
+ student_metrics_fig = plot_student_metrics(student_metrics_df, attendance_avg_stats, engagement_avg_stats)
228
 
229
  # Compute Student Metric Averages
230
  attendance_avg_stats, engagement_avg_stats = compute_average_metrics(student_metrics_df)
231
 
232
+ # # Two-column layout for the visualization and intervention frequency
233
+ # col1, col2 = st.columns([3, 1]) # Set the column width ratio
234
 
235
+ # with col1:
236
+ # student_metrics_fig = plot_student_metrics(student_metrics_df, attendance_avg_stats, engagement_avg_stats)
237
 
238
+ # with col2:
239
+ # # Display the "Attendance Average (%)" text and value
240
+ # st.markdown("<h3 style='color: #358E66;'>Attendance Average (%)</h3>", unsafe_allow_html=True)
241
+ # if attendance_avg_stats is not None:
242
+ # st.markdown(f"<h2 style='color: #358E66;'>{attendance_avg_stats}%</h2>", unsafe_allow_html=True)
243
+ # else:
244
+ # st.markdown("<h2 style='color: #358E66;'>N/A</h2>", unsafe_allow_html=True)
245
 
246
+ # # Display the "Engagement Average (%)" text and value
247
+ # st.markdown("<h3 style='color: #358E66;'>Engagement Average (%)</h3>", unsafe_allow_html=True)
248
+ # if engagement_avg_stats is not None:
249
+ # st.markdown(f"<h2 style='color: #358E66; margin-top: 0px; margin-bottom: 0px;'>{engagement_avg_stats}%</h2>", unsafe_allow_html=True)
250
+ # else:
251
+ # st.markdown("<h2 style='color: #358E66;'>N/A</h2>", unsafe_allow_html=True)
252
 
253
  # Add download button for Student Metrics chart
254
  download_chart(student_metrics_fig, "student_metrics_chart.png")