Spaces:
Sleeping
Sleeping
Create career_data.py
Browse files- career_data.py +24 -0
career_data.py
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
def get_career_recommendations(skills: str, interests: str):
|
2 |
+
# Mock data: mapping skills and interests to careers
|
3 |
+
career_options = {
|
4 |
+
"programming": "Software Engineer",
|
5 |
+
"design": "Graphic Designer",
|
6 |
+
"management": "Project Manager",
|
7 |
+
"communication": "Marketing Specialist",
|
8 |
+
}
|
9 |
+
|
10 |
+
# Simple rule-based matching
|
11 |
+
skills = skills.lower().split(",")
|
12 |
+
interests = interests.lower().split(",")
|
13 |
+
recommendations = []
|
14 |
+
|
15 |
+
for skill in skills:
|
16 |
+
if skill.strip() in career_options:
|
17 |
+
recommendations.append(career_options[skill.strip()])
|
18 |
+
|
19 |
+
for interest in interests:
|
20 |
+
if interest.strip() in career_options and career_options[interest.strip()] not in recommendations:
|
21 |
+
recommendations.append(career_options[interest.strip()])
|
22 |
+
|
23 |
+
# Return a list of career recommendations
|
24 |
+
return recommendations if recommendations else ["No matching career found."]
|