chburhan64 commited on
Commit
567f5be
·
verified ·
1 Parent(s): 434ebde

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +78 -0
app.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # App Title
4
+ st.title("🎓 Smart Career Advisor")
5
+
6
+ # Sidebar Info
7
+ st.sidebar.markdown("### Please provide the following details:")
8
+
9
+ # User Inputs
10
+ name = st.sidebar.text_input("Your Name:")
11
+ education = st.sidebar.selectbox("Education Level", ["High School", "Bachelor's", "Master's", "PhD"])
12
+ interests = st.sidebar.multiselect("Select Your Interests", ["Technology", "Science", "Art", "Business", "Health", "Education", "Law", "Engineering", "Writing"])
13
+ future_goal = st.sidebar.text_input("What is your future goal?")
14
+ work_style = st.sidebar.selectbox("Preferred Work Style", ["Remote", "On-site", "Hybrid", "Freelance"])
15
+
16
+ # Rule-Based Logic
17
+ def suggest_careers(edu, intrs, goal, work):
18
+ careers = []
19
+ resources = []
20
+ roles = []
21
+
22
+ if "Technology" in intrs:
23
+ careers.append("Software Developer")
24
+ roles.append("Frontend Developer, Data Analyst, AI Engineer")
25
+ resources.append("Coursera Python, freeCodeCamp, Harvard CS50")
26
+
27
+ if "Business" in intrs:
28
+ careers.append("Business Analyst")
29
+ roles.append("Product Manager, Marketing Analyst, Entrepreneur")
30
+ resources.append("Google Business Courses, MBA Essentials, HubSpot Academy")
31
+
32
+ if "Art" in intrs:
33
+ careers.append("Graphic Designer")
34
+ roles.append("UI/UX Designer, Animator, Illustrator")
35
+ resources.append("Canva Design School, Adobe Creative Cloud Tutorials")
36
+
37
+ if "Health" in intrs:
38
+ careers.append("Healthcare Professional")
39
+ roles.append("Nurse, Therapist, Lab Technician")
40
+ resources.append("Khan Academy Health, Medical Prep Resources")
41
+
42
+ if "Writing" in intrs:
43
+ careers.append("Content Writer")
44
+ roles.append("Copywriter, Blogger, Technical Writer")
45
+ resources.append("Grammarly Blog, Copywriting Courses on Udemy")
46
+
47
+ if not careers:
48
+ careers.append("Career Counselor Recommended")
49
+ roles.append("Please talk to an expert based on your unique profile.")
50
+ resources.append("LinkedIn Learning, Coursera, edX")
51
+
52
+ return careers, roles, resources
53
+
54
+ # Show Results
55
+ if st.sidebar.button("Get Career Advice"):
56
+ st.subheader(f"👋 Hello, {name}!")
57
+
58
+ st.markdown("### 🎯 Based on your inputs, here’s your career guidance:")
59
+
60
+ careers, roles, resources = suggest_careers(education, interests, future_goal, work_style)
61
+
62
+ with st.expander("📌 Suggested Career Paths"):
63
+ for c in careers:
64
+ st.write(f"- {c}")
65
+
66
+ with st.expander("💼 Potential Job Roles"):
67
+ for r in roles:
68
+ st.write(f"- {r}")
69
+
70
+ with st.expander("📚 Recommended Learning Resources"):
71
+ for res in resources:
72
+ st.write(f"- {res}")
73
+
74
+ with st.expander("📝 Your Profile Summary"):
75
+ st.markdown(f"**Education Level:** {education}")
76
+ st.markdown(f"**Interests:** {', '.join(interests)}")
77
+ st.markdown(f"**Future Goal:** {future_goal}")
78
+ st.markdown(f"**Preferred Work Style:** {work_style}")