Spaces:
Sleeping
Sleeping
File size: 1,609 Bytes
6dc350b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
import pandas as pd
def score_skills(user_skills, skills_df):
return int((len(user_skills) / len(skills_df)) * 100)
def classify_field(text, field_labels):
# Replace with a transformer model if needed
for field in field_labels:
if field.lower() in text.lower():
return field
return "General"
def recommend_countries(user_skills, countries_df):
return countries_df[countries_df["Skill"].isin(user_skills)].drop_duplicates()
def recommend_certifications(user_skills, cert_df):
return cert_df[cert_df["Skill"].isin(user_skills)].drop_duplicates()
def recommend_education(background, edu_tech_df, edu_non_tech_df):
return edu_tech_df if background == "technical" else edu_non_tech_df
def generate_roadmap(cv_data, field, score, country_jobs, certs, scholarships):
roadmap = f"""
## π Your Personalized Career Roadmap
- **Field**: {field}
- **Skill Score**: {score}/100
- **Years of Experience**: {cv_data['years_experience']}
### π Country-Based Job Opportunities:
{country_jobs.to_markdown(index=False) if not country_jobs.empty else 'No matching jobs found.'}
### π Recommended Certifications:
{certs.to_markdown(index=False) if not certs.empty else 'None found.'}
### π Suggested Scholarships:
{scholarships.to_markdown(index=False) if not scholarships.empty else 'None found.'}
### π§ Next Steps:
- Improve missing skills.
- Pursue listed certifications.
- Apply to the recommended countries.
- Consider higher education if needed.
"""
return roadmap
|