Update main.py
Browse files
main.py
CHANGED
|
@@ -143,17 +143,9 @@ def main():
|
|
| 143 |
with st.expander(f"{student_name} Decision Tree", expanded=False):
|
| 144 |
st.graphviz_chart(tree_diagram.source)
|
| 145 |
|
| 146 |
-
# # Prepare input for the language model
|
| 147 |
-
# llm_input = ai_analysis.prepare_llm_input(student_metrics_df)
|
| 148 |
-
|
| 149 |
-
# # Generate Notes and Recommendations using LLM
|
| 150 |
-
# with st.spinner("Generating MTSS.ai analysis..."):
|
| 151 |
-
# # recommendations = ai_analysis.prompt_response_from_hf_llm(llm_input)
|
| 152 |
-
# recommendations = ai_analysis.prompt_response_from_mistral_llm(llm_input)
|
| 153 |
-
|
| 154 |
# Generate Notes and Recommendations using LLM
|
| 155 |
if st.session_state.ai_recommendations is None:
|
| 156 |
-
with st.spinner("Generating MTSS.ai
|
| 157 |
llm_input = ai_analysis.prepare_llm_input(student_metrics_df)
|
| 158 |
# recommendations = ai_analysis.prompt_response_from_hf_llm(llm_input)
|
| 159 |
recommendations = ai_analysis.prompt_response_from_mistral_llm(llm_input)
|
|
@@ -168,20 +160,6 @@ def main():
|
|
| 168 |
# ai_analysis.download_llm_output(recommendations, "MTSSai_Report.txt")
|
| 169 |
ai_analysis.download_llm_output(st.session_state.ai_recommendations, "MTSSai_Report.txt")
|
| 170 |
|
| 171 |
-
# # Generate the PDF Report
|
| 172 |
-
# report_gen = ReportGenerator()
|
| 173 |
-
# combined_pdf = report_gen.create_combined_pdf(intervention_fig, student_metrics_fig, recommendations)
|
| 174 |
-
|
| 175 |
-
# # Add the download button
|
| 176 |
-
# st.download_button(
|
| 177 |
-
# label="Download Combined Report (PDF)",
|
| 178 |
-
# data=combined_pdf,
|
| 179 |
-
# file_name="combined_report.pdf",
|
| 180 |
-
# mime="application/pdf",
|
| 181 |
-
# icon="📄",
|
| 182 |
-
# use_container_width=True
|
| 183 |
-
# )
|
| 184 |
-
|
| 185 |
# Generate the PDF Report using the stored recommendations
|
| 186 |
report_gen = ReportGenerator()
|
| 187 |
combined_pdf = report_gen.create_combined_pdf(
|
|
|
|
| 143 |
with st.expander(f"{student_name} Decision Tree", expanded=False):
|
| 144 |
st.graphviz_chart(tree_diagram.source)
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
# Generate Notes and Recommendations using LLM
|
| 147 |
if st.session_state.ai_recommendations is None:
|
| 148 |
+
with st.spinner("Generating MTSS.ai Analysis..."):
|
| 149 |
llm_input = ai_analysis.prepare_llm_input(student_metrics_df)
|
| 150 |
# recommendations = ai_analysis.prompt_response_from_hf_llm(llm_input)
|
| 151 |
recommendations = ai_analysis.prompt_response_from_mistral_llm(llm_input)
|
|
|
|
| 160 |
# ai_analysis.download_llm_output(recommendations, "MTSSai_Report.txt")
|
| 161 |
ai_analysis.download_llm_output(st.session_state.ai_recommendations, "MTSSai_Report.txt")
|
| 162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
# Generate the PDF Report using the stored recommendations
|
| 164 |
report_gen = ReportGenerator()
|
| 165 |
combined_pdf = report_gen.create_combined_pdf(
|