Spaces:
Sleeping
Sleeping
Rishi commited on
Commit ·
59aec0c
1
Parent(s): bba2b6a
feat: enhance linkedin analyzer to act as career coach (swot & recommendations)
Browse filesFiles changed (2)
- app.py+10-1
- tools/linkedin_tool.py+19-2
718 unmodified lines719720721722723724725718 unmodified linesst.error(f"❌ {err}")returnagent_query = f"Please extract the LinkedIn profile context for '{selected_url}' and summarize their top skills, experience, and educational background beautifully. Make sure to append the RAW JSON API data at the bottom of your response."with st.spinner("Agent is scanning LinkedIn profile…"):from agent import ask_agent_async718 unmodified lines719720721722723724725726727728729730731732733734718 unmodified linesst.error(f"❌ {err}")returnagent_query = (f"Please extract the LinkedIn profile context for '{selected_url}' and act as an expert career coach. ""Using the extracted data (experience, education, certifications, projects), provide a deep profile analysis including: ""1. **Executive Summary** of their professional identity. ""2. **Plus Points** (Core strengths & unique skills). ""3. **Minus Points / Gaps** (Areas for improvement or missing elements). ""4. **Best Job Roles** (3-4 specific career trajectory recommendations). ""5. **Where to Apply** (Types of companies or specific Indian companies that fit this profile). ""Make sure to append the RAW JSON API data at the bottom of your response.")with st.spinner("Agent is scanning LinkedIn profile…"):from agent import ask_agent_async
49 unmodified lines505152535455565758599 unmodified lines69707172737449 unmodified lines"location": data.get("locationName"),"experiences": [],"education": [],}# Extract up to top 3 experiencesfor exp in data.get("experience", [])[:3]:profile_summary["experiences"].append({"companyName": exp.get("companyName"),"title": exp.get("title"),9 unmodified lines"fieldOfStudy": edu.get("fieldOfStudy"),})return json.dumps(profile_summary, indent=2)elif response.status_code == 404:49 unmodified lines5051525354555657585960619 unmodified lines71727374757677787980818283848586878889909149 unmodified lines"location": data.get("locationName"),"experiences": [],"education": [],"certifications": [],"projects": [],}# Extract up to top 5 experiences for deep analysisfor exp in data.get("experience", [])[:5]:profile_summary["experiences"].append({"companyName": exp.get("companyName"),"title": exp.get("title"),9 unmodified lines"fieldOfStudy": edu.get("fieldOfStudy"),})# Extract certifications (RapidAPI usually provides this under 'certifications')for cert in data.get("certifications", [])[:5]:profile_summary["certifications"].append({"name": cert.get("name"),"authority": cert.get("authority"),"timePeriod": cert.get("timePeriod")})# Extract projectsfor proj in data.get("projects", [])[:3]:profile_summary["projects"].append({"title": proj.get("title"),"description": proj.get("description")})return json.dumps(profile_summary, indent=2)elif response.status_code == 404:
app.py+10-1
tools/linkedin_tool.py+19-2