|  | import streamlit as st | 
					
						
						|  |  | 
					
						
						|  | class Sidebar: | 
					
						
						|  | def __init__(self): | 
					
						
						|  | self.main_body_logo = "mimtss.png" | 
					
						
						|  | self.sidebar_logo = "mimtss_small.png" | 
					
						
						|  | self.image_width = 300 | 
					
						
						|  | self.image_path = "mimtss.png" | 
					
						
						|  |  | 
					
						
						|  | def display(self): | 
					
						
						|  | st.logo(self.sidebar_logo, icon_image=self.main_body_logo) | 
					
						
						|  |  | 
					
						
						|  | with st.sidebar: | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | st.image(self.image_path, width=self.image_width) | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | with st.expander("Need help and report a bug"): | 
					
						
						|  | st.write(""" | 
					
						
						|  | **Contact**: Cheyne LeVesseur, PhD | 
					
						
						|  | **Email**: [email protected] | 
					
						
						|  | """) | 
					
						
						|  | st.divider() | 
					
						
						|  | st.subheader('User Instructions') | 
					
						
						|  |  | 
					
						
						|  |  | 
					
						
						|  | user_instructions = """ | 
					
						
						|  | - **Step 1**: Upload your Excel file. | 
					
						
						|  | - **Step 2**: Anonymization – student names are replaced with initials for privacy. | 
					
						
						|  | - **Step 3**: Review anonymized data. | 
					
						
						|  | - **Step 4**: View **intervention session statistics**. | 
					
						
						|  | - **Step 5**: Review **student attendance and engagement metrics**. | 
					
						
						|  | - **Step 6**: Review AI-generated **insights and recommendations**. | 
					
						
						|  | ### **Privacy Assurance** | 
					
						
						|  | - **No full names** are ever displayed or sent to the AI model—only initials are used. | 
					
						
						|  | - This ensures that sensitive data remains protected throughout the entire process. | 
					
						
						|  | ### **Detailed Instructions** | 
					
						
						|  | #### **1. Upload Your Excel File** | 
					
						
						|  | - Start by uploading an Excel file that contains intervention data. | 
					
						
						|  | - Click on the **“Upload your Excel file”** button and select your `.xlsx` file from your computer. | 
					
						
						|  | **Note**: Your file should have columns like "Did the intervention happen today?" and "Student Attendance [FirstName LastName]" for the analysis to work correctly. | 
					
						
						|  | #### **2. Automated Name Anonymization** | 
					
						
						|  | - Once the file is uploaded, the app will **automatically replace student names with initials** in the "Student Attendance" columns. | 
					
						
						|  | - For example, **"Student Attendance [Cheyne LeVesseur]"** will be displayed as **"Student Attendance [CL]"**. | 
					
						
						|  | - If the student only has a first name, like **"Student Attendance [Cheyne]"**, it will be displayed as **"Student Attendance [C]"**. | 
					
						
						|  | - This anonymization helps to **protect student privacy**, ensuring that full names are not visible or sent to the AI language model. | 
					
						
						|  | #### **3. Review the Uploaded Data** | 
					
						
						|  | - You will see the entire table of anonymized data to verify that the information has been uploaded correctly and that names have been replaced with initials. | 
					
						
						|  | #### **4. Intervention Session Statistics** | 
					
						
						|  | - The app will calculate and display statistics related to intervention sessions, such as: | 
					
						
						|  | - **Total Number of Days Available** | 
					
						
						|  | - **Intervention Sessions Held** | 
					
						
						|  | - **Intervention Sessions Not Held** | 
					
						
						|  | - **Intervention Frequency (%)** | 
					
						
						|  | - A **stacked bar chart** will be shown to visualize the number of sessions held versus not held. | 
					
						
						|  | - If you need to save the visualization, click the **“Download Chart”** button to download it as a `.png` file. | 
					
						
						|  | #### **5. Student Metrics Analysis** | 
					
						
						|  | - The app will also calculate metrics for each student: | 
					
						
						|  | - **Attendance (%)** – The percentage of intervention sessions attended. | 
					
						
						|  | - **Engagement (%)** – The level of engagement during attended sessions. | 
					
						
						|  | - These metrics will be presented in a **line graph** that shows attendance and engagement for each student. | 
					
						
						|  | - You can click the **“Download Chart”** button to download the visualization as a `.png` file. | 
					
						
						|  | #### **6. Generate AI Analysis and Recommendations** | 
					
						
						|  | - The app will prepare data from the student metrics to provide notes, key takeaways, and suggestions for improving outcomes using an **AI language model**. | 
					
						
						|  | - You will see a **spinner** labeled **“Generating AI analysis…”** while the AI processes the data. | 
					
						
						|  | - This step may take a little longer, but the spinner ensures you know that the system is working. | 
					
						
						|  | - Once the analysis is complete, the AI | 
					
						
						|  | - Once the analysis is complete, the AI's recommendations will be displayed under **"AI Analysis"**. | 
					
						
						|  | - You can click the **“Download LLM Output”** button to download the AI-generated recommendations as a `.txt` file for future reference. | 
					
						
						|  | """ | 
					
						
						|  | st.markdown(user_instructions) |