diff --git a/Advanced_Projects/SkillSync/.env-sample b/Advanced_Projects/SkillSync/.env-sample new file mode 100644 index 0000000000..e43d077496 --- /dev/null +++ b/Advanced_Projects/SkillSync/.env-sample @@ -0,0 +1,2 @@ +GOOGLE_API_KEY= +PROXYCURL_API_KEY= \ No newline at end of file diff --git a/Advanced_Projects/SkillSync/README.md b/Advanced_Projects/SkillSync/README.md new file mode 100644 index 0000000000..895f172972 --- /dev/null +++ b/Advanced_Projects/SkillSync/README.md @@ -0,0 +1,96 @@ +# **Skill Sync** + +### 🎯 **Goal** + +The primary goal of **Skill Sync** is to bridge the skill gap by analyzing an individual’s current skills against the demands of their career goals. The application helps users align their skillsets with market demands, suggesting relevant courses for upskilling and enabling seamless skill import from platforms like LinkedIn. + +### 🧵 **Dataset** + +**Skill Sync** does not use a pre-existing dataset. Instead, it gathers user-inputted skills or imports them from LinkedIn profiles to analyze and recommend relevant courses for skill development. The system also utilizes generative models to provide skill gap analysis and career insights. + +### 🧾 **Description** + +**Skill Sync** allows users to define their career goals and manually add skills or import them from LinkedIn. Using AI models, the app compares the user's current skill set with their desired career and suggests the best upskilling path. + +The system helps streamline skill development by providing course recommendations, career insights, and gap analysis, improving the user's chances of achieving their career objectives. + +### 🧮 **What I Had Done!** + +- Implemented a **manual skill addition feature** where users can input their skills. +- Integrated **LinkedIn API** to allow users to import their skills automatically. +- Developed a **career goal matching system**, leveraging **AI** for skill gap analysis. +- Suggested **relevant courses** based on skill gaps identified during analysis. + +### 🚀 **Models Implemented** + +- **Generative AI**: This model generates career insights and a comprehensive skill gap analysis based on the user’s inputs. +- **Gemini AI**: Used to map and identify skill deficiencies and recommend the best learning paths. + +### 📚 **Libraries Needed** + +- Flask +- requests +- google-generativeai +- pandas +- dotenv + +### 📊 **Exploratory Data Analysis Results** + +Since **Skill Sync** deals with real-time input from users, traditional data analysis is not performed. However, the app provides insights based on real-time user data like skills vs. market requirements, skill deficiencies, and suggested learning paths. + +### 📈 **Performance Metrics** + +The performance of the system is assessed through: +- **Accuracy of skill analysis**: How accurately the system identifies missing skills. +- **Relevance of recommended courses**: How relevant the suggested courses are to the user's career goals. +- **User satisfaction**: Feedback collected on how effective the tool is in helping users bridge their skill gaps. + +### 💻 How to Run + +To get started with **Skill Sync**, follow these steps: + +1. Navigate to the project directory: + + ```bash + cd SkillSync + ``` + +2. (Optional) Activate a virtual environment: + + ```bash + conda create -n venv python=3.10+ + conda activate venv + ``` + +3. Install dependencies: + + ```bash + pip install -r requirements.txt + ``` + +4. Configure environment variables: + + ``` + Rename `.env-sample` to `.env`. + Replace with your LinkedIn and Google API Keys. + ``` + + Kindly refer to these links for getting your own API keys: + - [LinkedIn API](https://developer.linkedin.com/) or [Proxy Curl API](https://nubela.co/proxycurl/linkedin) + - [Google Generative AI Key](https://ai.google.dev/tutorials/setup) + +5. Run the application: + + ```bash + streamlit run app.py + ``` + +### 📢 **Conclusion** + +**Skill Sync** is an effective tool for closing the skill gap by analyzing current skillsets and recommending relevant courses. It leverages AI models to provide detailed gap analysis and offers career-oriented guidance, ensuring that users stay on track to achieve their professional goals. + +### ✒️ **Signature** + +**[J B Mugundh]** +GitHub: [Github](https://github.com/J-B-Mugundh) +LinkedIn: [LinkedIn](https://www.linkedin.com/in/mugundhjb/) diff --git a/Advanced_Projects/SkillSync/app.py b/Advanced_Projects/SkillSync/app.py new file mode 100644 index 0000000000..c67d80e4b5 --- /dev/null +++ b/Advanced_Projects/SkillSync/app.py @@ -0,0 +1,97 @@ +from flask import Flask, request, render_template +import google.generativeai as genai +import os +import json +import requests +from dotenv import load_dotenv + +# Load environment variables from .env file +load_dotenv() + +app = Flask(__name__) + +# Load API keys from environment variables +PROXYCURL_API_KEY = os.getenv('PROXYCURL_API_KEY') +PROXYCURL_API_ENDPOINT = 'https://nubela.co/proxycurl/api/v2/linkedin' + +def get_gemini_response(career_goal, skills): + """Fetches response from Gemini API based on career goal and skills.""" + + query = f"Considering my career goal of '{career_goal}', what additional skills would I need to acquire if my current skills are {', '.join(skills)}? Just list them as a list. The skills should be actual programming or technical skills. Just give them concise, don't give extra words like Version control (eg. Git). List a maximum of 5 skills only. Display each with bulletin point." + + model = genai.GenerativeModel('gemini-pro') + api_key = os.getenv("GOOGLE_API_KEY") # Retrieve Google API key from .env + genai.configure(api_key=api_key) + + try: + response = model.generate_content(query) + return response.text + except Exception as e: + print(f"Error occurred during Gemini API call: {e}") + return "An error occurred while fetching data from Gemini. Please try again later." + +def get_linkedin_profile(linkedin_url): + """Fetches the LinkedIn profile using Proxycurl API.""" + + headers = { + 'Authorization': f'Bearer {PROXYCURL_API_KEY}', + } + + params = { + 'linkedin_profile_url': linkedin_url, + 'extra': 'include', + 'skills': 'include', + 'use_cache': 'if-present', + 'fallback_to_cache': 'on-error', + } + + try: + response = requests.get(PROXYCURL_API_ENDPOINT, params=params, headers=headers) + if response.status_code == 200: + return response.json() # Return profile data as a dictionary + else: + print(f"Error fetching LinkedIn profile: {response.status_code}") + return {"error": f"Error fetching profile, status code: {response.status_code}"} + + except Exception as e: + print(f"Error occurred during LinkedIn API proxy call: {e}") + return {"error": "An error occurred while fetching data from LinkedIn. Please try again later."} + +@app.route('/', methods=['GET', 'POST']) +def index(): + if request.method == 'POST': + career_goal = request.form['careerGoal'] + manual_skills = request.form.getlist('skill[]') + linkedin_url = request.form.get('linkedinProfileUrl') # Changed to get LinkedIn profile URL + profile_data = None + + if manual_skills or linkedin_url: + if linkedin_url: + profile_data = get_linkedin_profile(linkedin_url) + if 'skills' in profile_data: + skills_data = {"skills": profile_data['skills']} + else: + skills_data = {"skills": []} + else: + skills_data = {"skills": manual_skills} + + with open('skills.json', 'w') as json_file: + json.dump(skills_data, json_file) + + if linkedin_url: + profile_data = get_linkedin_profile(linkedin_url) + elif manual_skills: + profile_data = manual_skills + + if profile_data: + if 'error' in profile_data: + return render_template('index.html', error=profile_data['error']) + gemini_response = get_gemini_response(career_goal, profile_data['skills'] if 'skills' in profile_data else manual_skills) + return render_template('index.html', profile_data=profile_data, gemini_response=gemini_response) + else: + return render_template('index.html', error="Please enter your career goal and skills.") + + return render_template('index.html') + +if __name__ == '__main__': + app.run(debug=True, use_reloader=False) diff --git a/Advanced_Projects/SkillSync/requirements.txt b/Advanced_Projects/SkillSync/requirements.txt new file mode 100644 index 0000000000..39574e9d60 --- /dev/null +++ b/Advanced_Projects/SkillSync/requirements.txt @@ -0,0 +1,5 @@ +Flask +requests +google-generativeai +pandas +dotenv diff --git a/Advanced_Projects/SkillSync/templates/index.html b/Advanced_Projects/SkillSync/templates/index.html new file mode 100644 index 0000000000..14d40db7be --- /dev/null +++ b/Advanced_Projects/SkillSync/templates/index.html @@ -0,0 +1,173 @@ + + + + + + Skill Sync + + + + + + + +
+

Skill Sync

+
+
+ + +
+ +
+ + +
+ + + +
+ + +
+ + + + +
+ + {% if profile_data %} +
+ {% if gemini_response %} +

Skill Gap Analysis

+

{{ gemini_response }}

+ {% endif %} + {% if courses %} +

Recommended Courses

+
    + {% for course in courses %} +
  • {{ course }}
  • + {% endfor %} +
+ + {% endif %} +
+ {% endif %} +
+ + + + + + + + +