Update main.py
Browse files
main.py
CHANGED
|
@@ -5,7 +5,9 @@ from data_processor import DataProcessor # Import the data analysis class
|
|
| 5 |
from visualization import Visualization # Import the data viz class
|
| 6 |
from ai_analysis import AIAnalysis # Import the ai analysis class
|
| 7 |
from sidebar import Sidebar # Import the Sidebar class
|
|
|
|
| 8 |
|
|
|
|
| 9 |
|
| 10 |
def main():
|
| 11 |
# Initialize the app configuration
|
|
@@ -153,15 +155,17 @@ def main():
|
|
| 153 |
# Download AI output
|
| 154 |
ai_analysis.download_llm_output(recommendations, "llm_output.txt")
|
| 155 |
|
| 156 |
-
#
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
|
|
|
| 160 |
st.download_button(
|
| 161 |
label="Download Combined Report (PDF)",
|
| 162 |
data=combined_pdf,
|
| 163 |
file_name="combined_report.pdf",
|
| 164 |
-
mime="application/pdf"
|
|
|
|
| 165 |
)
|
| 166 |
|
| 167 |
except Exception as e:
|
|
|
|
| 5 |
from visualization import Visualization # Import the data viz class
|
| 6 |
from ai_analysis import AIAnalysis # Import the ai analysis class
|
| 7 |
from sidebar import Sidebar # Import the Sidebar class
|
| 8 |
+
from report import ReportGenerator
|
| 9 |
|
| 10 |
+
# ... (rest of your imports and app setup)
|
| 11 |
|
| 12 |
def main():
|
| 13 |
# Initialize the app configuration
|
|
|
|
| 155 |
# Download AI output
|
| 156 |
ai_analysis.download_llm_output(recommendations, "llm_output.txt")
|
| 157 |
|
| 158 |
+
# Generate the PDF Report
|
| 159 |
+
report_gen = ReportGenerator()
|
| 160 |
+
combined_pdf = report_gen.create_combined_pdf(intervention_fig, student_metrics_fig, recommendations)
|
| 161 |
+
|
| 162 |
+
# Add the download button
|
| 163 |
st.download_button(
|
| 164 |
label="Download Combined Report (PDF)",
|
| 165 |
data=combined_pdf,
|
| 166 |
file_name="combined_report.pdf",
|
| 167 |
+
mime="application/pdf",
|
| 168 |
+
icon="📄"
|
| 169 |
)
|
| 170 |
|
| 171 |
except Exception as e:
|