File size: 4,480 Bytes
0a1563c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import streamlit as st

# ---- PAGE CONFIG ----
st.set_page_config(page_title="Smart Career Advisor", layout="centered")

st.title("πŸŽ“ Smart Career Advisor")
st.markdown("Get career suggestions based on your background, interests, and goals.")

# ---- USER INPUT ----
with st.form("career_form"):
    name = st.text_input("πŸ‘€ Your Name")
    age = st.slider("πŸŽ‚ Age", 15, 60, 22)

    education_level = st.selectbox("πŸŽ“ Highest Education Level", [
        "High School", "Diploma", "Bachelor's Degree", "Master's Degree", "PhD"
    ])

    field_of_study = st.text_input("πŸ“˜ Field of Study (e.g., Computer Science, Business)")

    interests = st.multiselect("🧠 Interests", [
        "Technology", "Art", "Business", "Medicine", "Design", "Law", "Education",
        "Engineering", "Writing", "Finance", "Environment"
    ])

    future_goals = st.text_area("🌟 Your Future Goals", placeholder="Describe your long-term career goals")

    work_style = st.radio("πŸ’Ό Preferred Work Style", ["Remote", "On-site", "Hybrid", "Flexible"])

    hobbies = st.text_input("🎯 Any hobbies that could relate to your career?")

    submitted = st.form_submit_button("Get Career Suggestions")

# ---- LOGIC ----
def recommend_paths(education, field, interests, goals, style):
    suggestions = []

    # Tech
    if "Technology" in interests or "Engineering" in interests:
        suggestions.append({
            "Career Path": "Software Development",
            "Job Roles": ["Frontend Developer", "Backend Developer", "DevOps Engineer"],
            "Learning Resources": [
                "freeCodeCamp.org", "Coursera – Python for Everybody", "CS50 by Harvard"
            ],
            "Why": "Combines your interest in technology and problem-solving."
        })
    # Design
    if "Design" in interests or "Art" in interests:
        suggestions.append({
            "Career Path": "UI/UX Design",
            "Job Roles": ["UX Researcher", "UI Designer", "Interaction Designer"],
            "Learning Resources": ["Google UX Design on Coursera", "Figma", "Adobe XD Tutorials"],
            "Why": "Blends creativity with user-centric thinking."
        })
    # Business
    if "Business" in interests or "Finance" in interests:
        suggestions.append({
            "Career Path": "Business Analytics",
            "Job Roles": ["Data Analyst", "Product Manager", "Business Consultant"],
            "Learning Resources": ["Google Data Analytics", "Khan Academy – Economics", "LinkedIn Learning"],
            "Why": "Great for strategic thinking and data-driven decision making."
        })
    # Education
    if "Education" in interests:
        suggestions.append({
            "Career Path": "Educational Technology",
            "Job Roles": ["Instructional Designer", "EdTech Developer"],
            "Learning Resources": ["EdX – Learning Design", "TeachThought", "Coursera – EdTech"],
            "Why": "Perfect for knowledge sharing and innovation in learning."
        })
    # Medicine
    if "Medicine" in interests:
        suggestions.append({
            "Career Path": "Healthcare Technology",
            "Job Roles": ["Medical Technologist", "Health Data Analyst", "Bioinformatician"],
            "Learning Resources": ["Health Informatics – Coursera", "WHO Health Courses", "Bioinformatics 101"],
            "Why": "Connects science with improving patient care."
        })

    return suggestions

# ---- OUTPUT ----
if submitted:
    st.success(f"Hi {name}, here are your personalized career suggestions πŸ‘‡")

    recommendations = recommend_paths(
        education_level, field_of_study, interests, future_goals, work_style
    )

    if recommendations:
        for idx, rec in enumerate(recommendations):
            with st.container():
                st.subheader(f"πŸ”Ή Suggestion {idx+1}: {rec['Career Path']}")
                st.markdown(f"**Why this fits you:** {rec['Why']}")
                st.markdown("**Potential Job Roles:**")
                st.write(", ".join(rec["Job Roles"]))
                st.markdown("**Learning Resources to Get Started:**")
                for res in rec["Learning Resources"]:
                    st.write(f"πŸ”— {res}")
    else:
        st.warning("We couldn't generate a match from your current inputs. Try adding more interests!")

    # Extra: show a future motivation message
    st.markdown("---")
    st.info(f"🎯 Keep pushing towards your goal: _{future_goals}_")