Update app.py
Browse files
app.py
CHANGED
|
@@ -1114,6 +1114,7 @@ if st.session_state.get("show_summary", False):
|
|
| 1114 |
if num_qs_in_session == 0 and st.session_state.get("answers"): # Fallback if no generated_questions but answers exist
|
| 1115 |
num_qs_in_session = len(st.session_state.answers)
|
| 1116 |
|
|
|
|
| 1117 |
if st.session_state["selected_domain"] == "Soft Skills":
|
| 1118 |
num_qs_in_session = len(st.session_state.get("answers", []))
|
| 1119 |
max_score_possible_for_session = num_qs_in_session * 5.0
|
|
@@ -1129,6 +1130,23 @@ if st.session_state.get("show_summary", False):
|
|
| 1129 |
current_percentage_score = st.session_state.get('percentage_score', 0.0)
|
| 1130 |
current_overall_score = st.session_state.get('overall_score', 0.0)
|
| 1131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1132 |
if st.session_state["selected_domain"] == "Soft Skills":
|
| 1133 |
hr_table_data = []
|
| 1134 |
for param, config in HR_PARAMETERS_CONFIG.items():
|
|
@@ -1215,10 +1233,19 @@ if st.session_state.get("show_summary", False):
|
|
| 1215 |
|
| 1216 |
# Helper function to prepare summary text for download
|
| 1217 |
def prepare_summary_for_download():
|
| 1218 |
-
download_text = f"# GrillMaster Mock Interview Summary\n\n"
|
| 1219 |
-
download_text += f"**Selected Domain:** {st.session_state.get('selected_domain', 'N/A')}\n"
|
| 1220 |
-
dl_difficulty = st.session_state.get('difficulty_level_select', 'N/A')
|
| 1221 |
-
download_text += f"**Difficulty Level:** {dl_difficulty}\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1222 |
|
| 1223 |
num_q_for_max_score = len(st.session_state.get("generated_questions", st.session_state.get("answers",[])))
|
| 1224 |
max_s_for_dl = num_q_for_max_score * 5.0
|
|
|
|
| 1114 |
if num_qs_in_session == 0 and st.session_state.get("answers"): # Fallback if no generated_questions but answers exist
|
| 1115 |
num_qs_in_session = len(st.session_state.answers)
|
| 1116 |
|
| 1117 |
+
|
| 1118 |
if st.session_state["selected_domain"] == "Soft Skills":
|
| 1119 |
num_qs_in_session = len(st.session_state.get("answers", []))
|
| 1120 |
max_score_possible_for_session = num_qs_in_session * 5.0
|
|
|
|
| 1130 |
current_percentage_score = st.session_state.get('percentage_score', 0.0)
|
| 1131 |
current_overall_score = st.session_state.get('overall_score', 0.0)
|
| 1132 |
|
| 1133 |
+
# --- Retrieve stored configuration info ---
|
| 1134 |
+
selected_domain = st.session_state.get("selected_domain", "N/A")
|
| 1135 |
+
input_type = st.session_state.get("section_choice", st.session_state.get("soft_skill_mode", "N/A"))
|
| 1136 |
+
difficulty_level = st.session_state.get("difficulty_level_select", "N/A")
|
| 1137 |
+
total_questions_selected = st.session_state.get("num_qs", num_qs_in_session)
|
| 1138 |
+
selected_company = st.session_state.get("selected_company")
|
| 1139 |
+
selected_job_role = st.session_state.get("selected_job_role")
|
| 1140 |
+
|
| 1141 |
+
# --- Display configuration summary ---
|
| 1142 |
+
st.markdown("### ⚙️ Test Configuration Summary")
|
| 1143 |
+
st.markdown(f"""
|
| 1144 |
+
- **Domain Selected:** {selected_domain}
|
| 1145 |
+
- **Input Type / Mode:** {section_choice}
|
| 1146 |
+
- **Difficulty Level / Job Role:** {difficulty_level if selected_domain != "Finance" else job_roles}
|
| 1147 |
+
- **Total Questions Selected:** {total_questions_selected}
|
| 1148 |
+
""")
|
| 1149 |
+
|
| 1150 |
if st.session_state["selected_domain"] == "Soft Skills":
|
| 1151 |
hr_table_data = []
|
| 1152 |
for param, config in HR_PARAMETERS_CONFIG.items():
|
|
|
|
| 1233 |
|
| 1234 |
# Helper function to prepare summary text for download
|
| 1235 |
def prepare_summary_for_download():
|
| 1236 |
+
#download_text = f"# GrillMaster Mock Interview Summary\n\n"
|
| 1237 |
+
#download_text += f"**Selected Domain:** {st.session_state.get('selected_domain', 'N/A')}\n"
|
| 1238 |
+
#dl_difficulty = st.session_state.get('difficulty_level_select', 'N/A')
|
| 1239 |
+
#download_text += f"**Difficulty Level:** {dl_difficulty}\n"
|
| 1240 |
+
download_text = f"## GrillMaster Mock Interview Summary\n\n"
|
| 1241 |
+
download_text += f"**Selected Domain:** {selected_domain}\n"
|
| 1242 |
+
download_text += f"**Input Type** {section_choice}\n"
|
| 1243 |
+
download_text += f"**Difficulty Level / Job Role:** {difficulty_level if selected_domain != 'Finance' else job_roles}\n"
|
| 1244 |
+
download_text += f"**Total Questions Selected:** {total_questions_selected}\n"
|
| 1245 |
+
download_text += f"**Company Selected:** {selected_company}\n"
|
| 1246 |
+
download_text += f"**Job Role:** {selected_job_role}\n"
|
| 1247 |
+
#download_text += f"**Calculated Overall Score:** {current_overall_score:.1f} / {max_score_possible_for_session:.1f} ({current_percentage_score:.1f}%)\n\n"
|
| 1248 |
+
download_text += "## Questions & Candidate's Answers:\n"
|
| 1249 |
|
| 1250 |
num_q_for_max_score = len(st.session_state.get("generated_questions", st.session_state.get("answers",[])))
|
| 1251 |
max_s_for_dl = num_q_for_max_score * 5.0
|