Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -542,46 +542,46 @@ if uploaded_file is not None and st.button("Analyze My Google Fit"):
|
|
542 |
st.info(f"Summary generated in {summarization_time:.2f} seconds")
|
543 |
|
544 |
# Step 3: Generate Google fit assessment
|
545 |
-
status_text.text("Step 3/3: Evaluating Google fit...")
|
546 |
-
assessment, match_percentage, category_details, assessment_time = analyze_google_fit(summary)
|
547 |
-
progress_bar.progress(100)
|
548 |
|
549 |
-
# Clear status messages
|
550 |
-
status_text.empty()
|
551 |
|
552 |
-
# Display Google fit results
|
553 |
-
st.subheader("Google Fit Assessment")
|
554 |
|
555 |
-
# Display match percentage with appropriate color and emoji - with more realistic thresholds
|
556 |
-
if match_percentage >= 85:
|
557 |
-
|
558 |
-
elif match_percentage >= 70:
|
559 |
-
|
560 |
-
elif match_percentage >= 50:
|
561 |
-
|
562 |
-
else:
|
563 |
-
|
564 |
|
565 |
-
# NEW ADDITION: Add detailed score breakdown
|
566 |
-
st.markdown("### Score Breakdown")
|
567 |
|
568 |
-
# Create a neat table with category scores
|
569 |
-
breakdown_data = []
|
570 |
-
for category, details in category_details.items():
|
571 |
-
|
572 |
"advanced_tech": "Advanced Technology Knowledge",
|
573 |
"problem_solving": "Problem Solving Abilities",
|
574 |
"innovation": "Innovation Mindset",
|
575 |
"soft_skills": "Collaboration & Leadership"}[category]
|
576 |
|
577 |
-
|
578 |
-
|
579 |
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
})
|
586 |
|
587 |
# Convert to DataFrame and display
|
|
|
542 |
st.info(f"Summary generated in {summarization_time:.2f} seconds")
|
543 |
|
544 |
# Step 3: Generate Google fit assessment
|
545 |
+
status_text.text("Step 3/3: Evaluating Google fit...")
|
546 |
+
assessment, match_percentage, category_details, assessment_time = analyze_google_fit(summary)
|
547 |
+
progress_bar.progress(100)
|
548 |
|
549 |
+
# Clear status messages
|
550 |
+
status_text.empty()
|
551 |
|
552 |
+
# Display Google fit results
|
553 |
+
st.subheader("Google Fit Assessment")
|
554 |
|
555 |
+
# Display match percentage with appropriate color and emoji - with more realistic thresholds
|
556 |
+
if match_percentage >= 85:
|
557 |
+
st.success(f"**Overall Google Match Score:** {match_percentage}% π")
|
558 |
+
elif match_percentage >= 70:
|
559 |
+
st.success(f"**Overall Google Match Score:** {match_percentage}% β
")
|
560 |
+
elif match_percentage >= 50:
|
561 |
+
st.warning(f"**Overall Google Match Score:** {match_percentage}% β οΈ")
|
562 |
+
else:
|
563 |
+
st.error(f"**Overall Google Match Score:** {match_percentage}% π")
|
564 |
|
565 |
+
# NEW ADDITION: Add detailed score breakdown
|
566 |
+
st.markdown("### Score Breakdown")
|
567 |
|
568 |
+
# Create a neat table with category scores
|
569 |
+
breakdown_data = []
|
570 |
+
for category, details in category_details.items():
|
571 |
+
label = {"technical_skills": "Technical Programming Skills",
|
572 |
"advanced_tech": "Advanced Technology Knowledge",
|
573 |
"problem_solving": "Problem Solving Abilities",
|
574 |
"innovation": "Innovation Mindset",
|
575 |
"soft_skills": "Collaboration & Leadership"}[category]
|
576 |
|
577 |
+
# Create a visual indicator for the score
|
578 |
+
score = details["adjusted_score"]
|
579 |
|
580 |
+
# Add formatted breakdown row
|
581 |
+
breakdown_data.append({
|
582 |
+
"Category": label,
|
583 |
+
"Score": f"{score}%",
|
584 |
+
"Matching Skills": ", ".join(details["matching_keywords"][:3]) if details["matching_keywords"] else "None detected"
|
585 |
})
|
586 |
|
587 |
# Convert to DataFrame and display
|