Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
# ----------------- Title -----------------
|
| 4 |
+
st.set_page_config(page_title="Smart Career Advisor", layout="centered")
|
| 5 |
+
st.title("🧠 Smart Career Advisor")
|
| 6 |
+
st.markdown("Get personalized career suggestions based on your interests and preferences.")
|
| 7 |
+
|
| 8 |
+
# ----------------- User Input -----------------
|
| 9 |
+
st.header("📋 Tell us about yourself")
|
| 10 |
+
|
| 11 |
+
education = st.selectbox("What is your highest education level?", [
|
| 12 |
+
"High School", "Diploma", "Bachelor's Degree", "Master's Degree", "PhD"
|
| 13 |
+
])
|
| 14 |
+
|
| 15 |
+
interests = st.multiselect("What are your main interests?", [
|
| 16 |
+
"Technology", "Art & Design", "Business", "Science", "Health & Medicine",
|
| 17 |
+
"Education", "Law", "Engineering", "Social Work", "Writing & Journalism"
|
| 18 |
+
])
|
| 19 |
+
|
| 20 |
+
goals = st.text_input("What are your future goals? (e.g., become a data scientist, run a business)")
|
| 21 |
+
|
| 22 |
+
work_style = st.selectbox("What is your preferred work style?", [
|
| 23 |
+
"Remote", "On-site", "Hybrid", "Freelance", "Entrepreneurship"
|
| 24 |
+
])
|
| 25 |
+
|
| 26 |
+
skills = st.text_input("Any specific skills you have or are learning? (Optional)")
|
| 27 |
+
|
| 28 |
+
# ----------------- Recommendation Logic -----------------
|
| 29 |
+
def recommend_careers(education, interests, goals, work_style):
|
| 30 |
+
career_paths = []
|
| 31 |
+
job_roles = []
|
| 32 |
+
resources = []
|
| 33 |
+
|
| 34 |
+
if "Technology" in interests:
|
| 35 |
+
career_paths.append("Technology & Software Development")
|
| 36 |
+
job_roles += ["Software Engineer", "Data Analyst", "AI/ML Engineer", "Web Developer"]
|
| 37 |
+
resources += ["freecodecamp.org", "coursera.org", "kaggle.com", "w3schools.com"]
|
| 38 |
+
|
| 39 |
+
if "Art & Design" in interests:
|
| 40 |
+
career_paths.append("Creative & Design")
|
| 41 |
+
job_roles += ["Graphic Designer", "UI/UX Designer", "Animator", "Illustrator"]
|
| 42 |
+
resources += ["canva.com", "behance.net", "udemy.com/courses/design"]
|
| 43 |
+
|
| 44 |
+
if "Business" in interests:
|
| 45 |
+
career_paths.append("Business & Management")
|
| 46 |
+
job_roles += ["Marketing Manager", "Business Analyst", "Entrepreneur"]
|
| 47 |
+
resources += ["hubspot academy", "edx.org", "hbr.org"]
|
| 48 |
+
|
| 49 |
+
if "Health & Medicine" in interests:
|
| 50 |
+
career_paths.append("Healthcare")
|
| 51 |
+
job_roles += ["Nurse", "Doctor", "Medical Lab Technician"]
|
| 52 |
+
resources += ["khanacademy.org", "medscape.com", "coursera.org/health"]
|
| 53 |
+
|
| 54 |
+
if "Writing & Journalism" in interests:
|
| 55 |
+
career_paths.append("Content & Media")
|
| 56 |
+
job_roles += ["Content Writer", "Journalist", "Copywriter"]
|
| 57 |
+
resources += ["medium.com", "grammarly blog", "contentmarketinginstitute.com"]
|
| 58 |
+
|
| 59 |
+
return list(set(career_paths)), list(set(job_roles)), list(set(resources))
|
| 60 |
+
|
| 61 |
+
# ----------------- Display Recommendations -----------------
|
| 62 |
+
if st.button("🎯 Get Career Advice"):
|
| 63 |
+
if not interests or not education:
|
| 64 |
+
st.warning("Please complete all required fields.")
|
| 65 |
+
else:
|
| 66 |
+
careers, roles, links = recommend_careers(education, interests, goals, work_style)
|
| 67 |
+
|
| 68 |
+
st.subheader("🧭 Suggested Career Paths")
|
| 69 |
+
for c in careers:
|
| 70 |
+
st.markdown(f"- {c}")
|
| 71 |
+
|
| 72 |
+
st.subheader("💼 Possible Job Roles")
|
| 73 |
+
for r in roles:
|
| 74 |
+
st.markdown(f"- {r}")
|
| 75 |
+
|
| 76 |
+
st.subheader("📚 Learning Resources")
|
| 77 |
+
for l in links:
|
| 78 |
+
st.markdown(f"- [{l}]({l})")
|
| 79 |
+
|
| 80 |
+
if goals:
|
| 81 |
+
st.subheader("🎯 Your Goals")
|
| 82 |
+
st.info(f"You mentioned: **{goals}**")
|
| 83 |
+
|
| 84 |
+
if skills:
|
| 85 |
+
st.subheader("🔧 Your Skills")
|
| 86 |
+
st.info(f"Skills: **{skills}**")
|
| 87 |
+
|
| 88 |
+
# ----------------- Footer -----------------
|
| 89 |
+
st.markdown("---")
|
| 90 |
+
st.markdown("Made with ❤️ for students exploring their future.")
|