Imarticuslearning commited on
Commit
a2d44a0
·
verified ·
1 Parent(s): c78665e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -22
app.py CHANGED
@@ -903,7 +903,7 @@ if st.session_state["generated_questions"]:
903
  st.session_state["response_file"] = wav_path
904
  st.session_state["record_phase"] = "listening"
905
  st.success("✅ Audio uploaded. You may now confirm your answer.")
906
- st.audio(wav_path, format="audio/wav")
907
  """
908
  if st.button("⏹️ Confirm & Next"):
909
  try:
@@ -1025,28 +1025,28 @@ if st.session_state.get("show_summary", False):
1025
  current_overall_score = st.session_state.get('overall_score', 0.0)
1026
 
1027
  if st.session_state["selected_domain"] == "Soft Skills":
1028
- hr_table_data = []
1029
- for param, config in HR_PARAMETERS_CONFIG.items():
1030
- score = st.session_state.get("hr_parameter_scores_dict", {}).get(param, 0.0)
1031
- weight_percent = config["weight_original"]
1032
- contribution = (score / 5.0) * config["weight_normalized"]
 
 
 
 
 
 
 
1033
  hr_table_data.append({
1034
- "Parameter": param,
1035
- "Weight (Original %)": f"{weight_percent}%",
1036
- "Score (1–5)": round(score, 1),
1037
- "Contribution to Final %": f"{contribution:.1f}%"
1038
- })
1039
-
1040
- hr_table_data.append({
1041
- "Parameter": "Total",
1042
- "Weight (Original %)": "100%",
1043
- "Score (1–5)": "",
1044
- "Contribution to Final %": f"{current_percentage_score:.1f}%"
1045
- })
1046
-
1047
- r_df = pd.DataFrame(hr_table_data)
1048
- st.markdown("### 🧾 Soft Skills Evaluation Breakdown")
1049
- st.dataframe(hr_df, use_container_width=True)
1050
 
1051
  # Display the calculated score and percentage bar first in a card
1052
  st.markdown(f"""
 
903
  st.session_state["response_file"] = wav_path
904
  st.session_state["record_phase"] = "listening"
905
  st.success("✅ Audio uploaded. You may now confirm your answer.")
906
+ #st.audio(wav_path, format="audio/wav")
907
  """
908
  if st.button("⏹️ Confirm & Next"):
909
  try:
 
1025
  current_overall_score = st.session_state.get('overall_score', 0.0)
1026
 
1027
  if st.session_state["selected_domain"] == "Soft Skills":
1028
+ hr_table_data = []
1029
+ for param, config in HR_PARAMETERS_CONFIG.items():
1030
+ score = st.session_state.get("hr_parameter_scores_dict", {}).get(param, 0.0)
1031
+ weight_percent = config["weight_original"]
1032
+ contribution = (score / 5.0) * config["weight_normalized"]
1033
+ hr_table_data.append({
1034
+ "Parameter": param,
1035
+ "Weight (Original %)": f"{weight_percent}%",
1036
+ "Score (1–5)": round(score, 1),
1037
+ "Contribution to Final %": f"{contribution:.1f}%"
1038
+ })
1039
+
1040
  hr_table_data.append({
1041
+ "Parameter": "Total",
1042
+ "Weight (Original %)": "100%",
1043
+ "Score (1–5)": "",
1044
+ "Contribution to Final %": f"{current_percentage_score:.1f}%"
1045
+ })
1046
+
1047
+ r_df = pd.DataFrame(hr_table_data)
1048
+ st.markdown("### 🧾 Soft Skills Evaluation Breakdown")
1049
+ st.dataframe(hr_df, use_container_width=True)
 
 
 
 
 
 
 
1050
 
1051
  # Display the calculated score and percentage bar first in a card
1052
  st.markdown(f"""