Update main.py
Browse files
main.py
CHANGED
|
@@ -93,21 +93,6 @@ def main():
|
|
| 93 |
for index, row in student_metrics_df.iterrows():
|
| 94 |
tree_diagram = visualization.build_tree_diagram(row)
|
| 95 |
st.graphviz_chart(tree_diagram.source)
|
| 96 |
-
|
| 97 |
-
# Render and prepare the diagram for download
|
| 98 |
-
filename = f"{row['Student']}_decision_tree"
|
| 99 |
-
filepath = visualization.download_tree_diagram(tree_diagram, filename)
|
| 100 |
-
|
| 101 |
-
# Provide a download button
|
| 102 |
-
with open(filepath, "rb") as file:
|
| 103 |
-
st.download_button(
|
| 104 |
-
label=f"Download {row['Student']}'s Diagram",
|
| 105 |
-
data=file.read(),
|
| 106 |
-
file_name=f"{filename}.png",
|
| 107 |
-
mime="image/png",
|
| 108 |
-
icon="↹",
|
| 109 |
-
use_container_width=True
|
| 110 |
-
)
|
| 111 |
|
| 112 |
# Prepare input for the language model
|
| 113 |
llm_input = ai_analysis.prepare_llm_input(student_metrics_df)
|
|
|
|
| 93 |
for index, row in student_metrics_df.iterrows():
|
| 94 |
tree_diagram = visualization.build_tree_diagram(row)
|
| 95 |
st.graphviz_chart(tree_diagram.source)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
# Prepare input for the language model
|
| 98 |
llm_input = ai_analysis.prepare_llm_input(student_metrics_df)
|