IqraFatima commited on
Commit
365db9f
Β·
verified Β·
1 Parent(s): 9820897

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +97 -0
app.py ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ st.set_page_config(page_title="Smart Career Advisor", layout="centered")
4
+
5
+ st.title("πŸŽ“ Smart Career Advisor")
6
+ st.markdown("Get career suggestions based on your background, interests, and goals.")
7
+
8
+ # ---- Input Form ----
9
+ with st.form("career_form"):
10
+ name = st.text_input("πŸ‘€ Your Name")
11
+ age = st.slider("πŸŽ‚ Age", 15, 60, 22)
12
+
13
+ education_level = st.selectbox("πŸŽ“ Highest Education Level", [
14
+ "High School", "Diploma", "Bachelor's Degree", "Master's Degree", "PhD"
15
+ ])
16
+
17
+ field_of_study = st.text_input("πŸ“˜ Field of Study (e.g., Computer Science, Business)")
18
+
19
+ interests = st.multiselect("🧠 Interests", [
20
+ "Technology", "Art", "Business", "Medicine", "Design", "Law", "Education",
21
+ "Engineering", "Writing", "Finance", "Environment"
22
+ ])
23
+
24
+ future_goals = st.text_area("🌟 Your Future Goals", placeholder="Describe your long-term career goals")
25
+
26
+ work_style = st.radio("πŸ’Ό Preferred Work Style", ["Remote", "On-site", "Hybrid", "Flexible"])
27
+
28
+ hobbies = st.text_input("🎯 Any hobbies that could relate to your career?")
29
+
30
+ submitted = st.form_submit_button("Get Career Suggestions")
31
+
32
+ # ---- Rule-based Suggestions ----
33
+ def recommend_paths(interests):
34
+ suggestions = []
35
+
36
+ if "Technology" in interests or "Engineering" in interests:
37
+ suggestions.append({
38
+ "Career": "Software Development",
39
+ "Roles": ["Frontend Developer", "Backend Developer", "DevOps Engineer"],
40
+ "Resources": ["freeCodeCamp.org", "CS50 by Harvard", "Coursera – Python Basics"],
41
+ "Why": "Great for tech lovers and problem solvers."
42
+ })
43
+
44
+ if "Design" in interests or "Art" in interests:
45
+ suggestions.append({
46
+ "Career": "UI/UX Design",
47
+ "Roles": ["UX Designer", "UI Researcher", "Interaction Designer"],
48
+ "Resources": ["Google UX Design", "Figma Learn", "Adobe XD Basics"],
49
+ "Why": "Combines creativity with digital design."
50
+ })
51
+
52
+ if "Business" in interests or "Finance" in interests:
53
+ suggestions.append({
54
+ "Career": "Business Analytics",
55
+ "Roles": ["Business Analyst", "Product Manager", "Financial Analyst"],
56
+ "Resources": ["Google Data Analytics", "LinkedIn Learning – Excel", "Khan Academy – Finance"],
57
+ "Why": "Fits strategic thinkers and analysts."
58
+ })
59
+
60
+ if "Medicine" in interests:
61
+ suggestions.append({
62
+ "Career": "Healthcare Tech",
63
+ "Roles": ["Health Data Analyst", "Medical Technologist"],
64
+ "Resources": ["WHO Courses", "Coursera – Health Informatics"],
65
+ "Why": "Tech meets medicine and data."
66
+ })
67
+
68
+ if "Education" in interests:
69
+ suggestions.append({
70
+ "Career": "EdTech & Teaching",
71
+ "Roles": ["Instructional Designer", "Online Educator"],
72
+ "Resources": ["TeachThought", "edX Teaching Courses"],
73
+ "Why": "For those who love teaching and innovation."
74
+ })
75
+
76
+ return suggestions
77
+
78
+ # ---- Output ----
79
+ if submitted:
80
+ st.success(f"Hi {name}, based on your inputs, here are some career paths to consider:")
81
+
82
+ results = recommend_paths(interests)
83
+
84
+ if results:
85
+ for i, rec in enumerate(results):
86
+ st.subheader(f"πŸ”Ή Suggestion {i+1}: {rec['Career']}")
87
+ st.markdown(f"**Why:** {rec['Why']}")
88
+ st.markdown("**Roles You Can Explore:**")
89
+ st.write(", ".join(rec["Roles"]))
90
+ st.markdown("**Learn More:**")
91
+ for res in rec["Resources"]:
92
+ st.markdown(f"- {res}")
93
+ else:
94
+ st.warning("No suggestions matched. Try selecting more or different interests.")
95
+
96
+ st.markdown("---")
97
+ st.info(f"🎯 _Keep working toward your goal:_ {future_goals}")