import streamlit as st | |
# class Sidebar: | |
# def __init__(self): | |
# self.main_body_logo = "mimtss.png" | |
# self.sidebar_logo = "mtss.ai_small.png" | |
# self.image_width = 200 | |
# self.image_path = "mimtss.png" | |
# def display(self): | |
# # st.logo(self.sidebar_logo, icon_image=self.main_body_logo) | |
# st.logo(self.sidebar_logo, icon_image=self.main_body_logo, size="large") | |
# with st.sidebar: | |
# # Password input field (commented out) | |
# # password = st.text_input("Enter Password:", type="password") | |
# # Display the image | |
# st.image(self.image_path, width=self.image_width) | |
# # Toggle for Help and Report a Bug | |
# with st.expander("Powered by MTSS.ai"): | |
# st.write(""" | |
# **Contact**: Cheyne LeVesseur, PhD | |
# **Email**: [email protected] | |
# """) | |
# st.divider() | |
# st.subheader('User Instructions') | |
# # Principles text with Markdown formatting | |
# 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) | |
# class Sidebar: | |
# def __init__(self): | |
# self.main_body_logo = "mimtss.png" | |
# self.sidebar_logo = "mtss.ai_small.png" | |
# self.image_width = 200 | |
# self.image_path = "mimtss.png" | |
# def display(self): | |
# st.logo(self.sidebar_logo, icon_image=self.main_body_logo, size="large") | |
# with st.sidebar: | |
# # Display the image | |
# st.image(self.image_path, width=self.image_width) | |
# # Toggle for Help and Report a Bug | |
# with st.expander("Powered by MTSS.ai"): | |
# st.write(""" | |
# **Contact**: Cheyne LeVesseur, PhD | |
# **Email**: [email protected] | |
# """) | |
# st.divider() | |
# st.subheader('Spreadsheet Headers') | |
# headers_info = """ | |
# Your spreadsheet must include the following headers for proper analysis: | |
# 1. **Date Column**: | |
# - "Date of Session" or "Date" | |
# 2. **Intervention Column**: | |
# - "Did the intervention happen today?" or | |
# - "Did the intervention take place today?" | |
# 3. **Student Attendance Columns**: | |
# - Format: "Student Attendance [student name]" | |
# - Options: Engaged, Partially Engaged, Not Engaged, Absent | |
# - Example: "Student Attendance [Charlie Gordon]" | |
# #### Important Note on Student Names: | |
# - For students with the same initials, you must use a unique identifier to distinguish them. | |
# - Best practices for unique identifiers: | |
# - Add a middle name: "Charlie Gordon" --> "Charlie A. Gordon" | |
# - Use a unique identifier: "Charlie Gordon 1" and "Clarissa Gao 2" | |
# This ensures that when names are truncated to initials, each student has a unique identifier. | |
# """ | |
# st.markdown(headers_info) | |
# st.divider() | |
# st.subheader('User Instructions') | |
# # Existing 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'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) | |
import streamlit as st | |
class Sidebar: | |
def __init__(self): | |
self.main_body_logo = "mimtss.png" | |
self.sidebar_logo = "mtss.ai_small.png" | |
self.image_width = 200 | |
self.image_path = "mimtss.png" | |
def display(self): | |
st.logo(self.sidebar_logo, icon_image=self.main_body_logo, size="large") | |
with st.sidebar: | |
# Display the image | |
st.image(self.image_path, width=self.image_width) | |
# Toggle for Help and Report a Bug | |
with st.expander("Powered by MTSS.ai"): | |
st.write(""" | |
**Contact**: Cheyne LeVesseur, PhD | |
**Email**: [email protected] | |
""") | |
st.divider() | |
# Download button for example spreadsheet | |
st.download_button( | |
label="Download Example Spreadsheet", | |
data=open("Example_LIR_Spreadsheet.xlsx", "rb").read(), | |
file_name="Example_LIR_Spreadsheet.xlsx", | |
mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | |
) | |
with st.expander("Spreadsheet Headers"): | |
headers_info = """ | |
Your spreadsheet must include the following headers for proper analysis: | |
1. **Date Column**: | |
- "Date of Session" or "Date" | |
2. **Intervention Column**: | |
- "Did the intervention happen today?" or | |
- "Did the intervention take place today?" | |
3. **Student Attendance Columns**: | |
- Format: "Student Attendance [student name]" | |
- Options: Engaged, Partially Engaged, Not Engaged, Absent | |
- Example: "Student Attendance [Charlie Gordon]" | |
#### Important Note on Student Names: | |
- For students with the same initials, you must use a unique identifier to distinguish them. | |
- Best practices for unique identifiers: | |
- Add a middle name: "Charlie Gordon" --> "Charlie A. Gordon" | |
- Use a unique identifier: "Charlie Gordon 1" and "Clarissa Gao 2" | |
This ensures that when names are truncated to initials, each student has a unique identifier. | |
""" | |
st.markdown(headers_info) | |
with st.expander("Privacy Assurance"): | |
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. | |
""" | |
st.markdown(privacy_assurance) | |
with st.expander("Instructions"): | |
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**. | |
""" | |
st.markdown(instructions) | |
with st.expander("Detailed Instructions"): | |
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'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(detailed_instructions) |