Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,29 +60,39 @@ def create_dynamic_roadmap(skills, certs, scholarships, edu_opps):
|
|
| 60 |
now = datetime.now()
|
| 61 |
roadmap = []
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
return pd.DataFrame(roadmap)
|
| 85 |
|
|
|
|
| 86 |
# UI
|
| 87 |
st.title("📊 Personalized Skill Scoring & Career Roadmap App")
|
| 88 |
st.markdown("Upload your CV and get a detailed roadmap with live job listings.")
|
|
|
|
| 60 |
now = datetime.now()
|
| 61 |
roadmap = []
|
| 62 |
|
| 63 |
+
# Detect a valid certification column
|
| 64 |
+
cert_col = next((col for col in certs.columns if col.lower() in ["certification", "name", "title"]), None)
|
| 65 |
+
if cert_col:
|
| 66 |
+
for i, cert in enumerate(certs[cert_col].dropna().tolist()[:2]):
|
| 67 |
+
roadmap.append({
|
| 68 |
+
"Task": f"Complete {cert}",
|
| 69 |
+
"Start": (now + timedelta(days=i * 30)).strftime("%Y-%m-%d"),
|
| 70 |
+
"Finish": (now + timedelta(days=(i + 1) * 30)).strftime("%Y-%m-%d")
|
| 71 |
+
})
|
| 72 |
+
|
| 73 |
+
# Detect a valid scholarship column
|
| 74 |
+
scholarship_col = next((col for col in scholarships.columns if col.lower() in ["scholarship", "name", "title"]), None)
|
| 75 |
+
if scholarship_col:
|
| 76 |
+
for i, scholarship in enumerate(scholarships[scholarship_col].dropna().tolist()[:2]):
|
| 77 |
+
roadmap.append({
|
| 78 |
+
"Task": f"Apply for {scholarship}",
|
| 79 |
+
"Start": (now + timedelta(days=90 + i * 30)).strftime("%Y-%m-%d"),
|
| 80 |
+
"Finish": (now + timedelta(days=120 + i * 30)).strftime("%Y-%m-%d")
|
| 81 |
+
})
|
| 82 |
+
|
| 83 |
+
# Detect a valid education column
|
| 84 |
+
edu_col = next((col for col in edu_opps.columns if col.lower() in ["program", "course", "degree", "title"]), None)
|
| 85 |
+
if edu_col:
|
| 86 |
+
for i, degree in enumerate(edu_opps[edu_col].dropna().tolist()[:1]):
|
| 87 |
+
roadmap.append({
|
| 88 |
+
"Task": f"Pursue {degree}",
|
| 89 |
+
"Start": (now + timedelta(days=180)).strftime("%Y-%m-%d"),
|
| 90 |
+
"Finish": (now + timedelta(days=720)).strftime("%Y-%m-%d")
|
| 91 |
+
})
|
| 92 |
|
| 93 |
return pd.DataFrame(roadmap)
|
| 94 |
|
| 95 |
+
|
| 96 |
# UI
|
| 97 |
st.title("📊 Personalized Skill Scoring & Career Roadmap App")
|
| 98 |
st.markdown("Upload your CV and get a detailed roadmap with live job listings.")
|