Spaces:
Sleeping
Sleeping
chore: update project dependencies and add README and TODO files for better documentation and feature tracking
Browse files- README.md +152 -0
- TODO.md +11 -0
- app/main.py +4 -5
- pyproject.toml +0 -2
- requirements.txt +169 -0
- uv.lock +0 -0
README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: LinkedIn Career Advisor
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 3.50.2
|
| 8 |
+
app_file: app/main.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# LinkedIn Career Advisor 🚀
|
| 13 |
+
|
| 14 |
+

|
| 15 |
+

|
| 16 |
+

|
| 17 |
+

|
| 18 |
+
|
| 19 |
+
A professional career pathway analysis tool that leverages AI to provide tailored career path recommendations based on your professional background, education, and goals. No telemetry.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
|
| 23 |
+
## ✨ Features
|
| 24 |
+
|
| 25 |
+
- **Comprehensive Career Analysis**: Get detailed insights on potential career paths tailored to your unique professional background
|
| 26 |
+
- **Multi-dimensional Evaluation**: Each path is scored on financial potential, human impact, and opportunity creation
|
| 27 |
+
- **Customizable Preferences**: Adjust weights for different factors based on your personal priorities
|
| 28 |
+
- **Time Horizon Options**: Choose between short-term (3 years), mid-term (10 years), or long-term (10+ years) career planning
|
| 29 |
+
- **Easy Sharing**: Export your analysis to LinkedIn or copy to clipboard with a single click
|
| 30 |
+
- **Intuitive Interface**: User-friendly Gradio UI for seamless interaction
|
| 31 |
+
|
| 32 |
+
## 🔧 Installation
|
| 33 |
+
|
| 34 |
+
### Prerequisites
|
| 35 |
+
|
| 36 |
+
- Python 3.12 or higher
|
| 37 |
+
- OpenAI API key
|
| 38 |
+
|
| 39 |
+
### Setup
|
| 40 |
+
|
| 41 |
+
1. Clone the repository:
|
| 42 |
+
```bash
|
| 43 |
+
git clone https://github.com/danivpv/linkedinadvice.git
|
| 44 |
+
cd linkedinadvice
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
2. Install dependencies using uv (recommended):
|
| 48 |
+
```bash
|
| 49 |
+
uv sync --all-extras
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
3. Create a `.env` file in the root directory with your OpenAI API key:
|
| 53 |
+
```
|
| 54 |
+
OPENAI_API_KEY=your-api-key-here
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## 🚀 Running Locally
|
| 58 |
+
|
| 59 |
+
Start the application with:
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
uv run poe start # alternatively, uv run gradio app/main.py
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
The Gradio interface will be available at `http://localhost:7860` in your browser.
|
| 66 |
+
|
| 67 |
+
## 📦 Project Structure
|
| 68 |
+
|
| 69 |
+
```
|
| 70 |
+
linkedin-career-advisor/
|
| 71 |
+
├── app/
|
| 72 |
+
│ ├── main.py # Application entry point and Gradio UI
|
| 73 |
+
│ ├── constants.py # Application constants and example data
|
| 74 |
+
│ └── utils.py # Utility functions for clipboard and sharing
|
| 75 |
+
│
|
| 76 |
+
├── linkedinadvice/
|
| 77 |
+
│ ├── __init__.py
|
| 78 |
+
│ ├── career_analysis.py # Career analysis using LangChain and LLM
|
| 79 |
+
│ └── monitoring.py # API usage monitoring and logging
|
| 80 |
+
│
|
| 81 |
+
├── requirements.txt # Project dependencies
|
| 82 |
+
├── .env # Environment variables (not tracked by git)
|
| 83 |
+
└── README.md # Project documentation
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## 🌐 Deploying to Hugging Face Spaces
|
| 87 |
+
|
| 88 |
+
1. Create a new Space on [Hugging Face Spaces](https://huggingface.co/spaces)
|
| 89 |
+
2. Choose Gradio as the SDK
|
| 90 |
+
3. Push this repository to the created Space
|
| 91 |
+
4. Add your `OPENAI_API_KEY` as a secret in the Space settings
|
| 92 |
+
|
| 93 |
+
## 💻 Development
|
| 94 |
+
|
| 95 |
+
### Dependencies
|
| 96 |
+
|
| 97 |
+
- `gradio`: For the web interface
|
| 98 |
+
- `langchain`: For LLM integration and career analysis pipeline
|
| 99 |
+
- `openai`: For accessing GPT models
|
| 100 |
+
- `python-dotenv`: For environment variable management
|
| 101 |
+
|
| 102 |
+
### Adding New Features
|
| 103 |
+
|
| 104 |
+
To extend the application:
|
| 105 |
+
1. Modify the analysis logic in `linkedinadvice/career_analysis.py`
|
| 106 |
+
2. Update UI components in `app/main.py`
|
| 107 |
+
3. Add new constants in `app/constants.py` if needed
|
| 108 |
+
|
| 109 |
+
## 📊 Usage Example
|
| 110 |
+
|
| 111 |
+
1. **Input your professional experience**:
|
| 112 |
+
- Add current and previous roles
|
| 113 |
+
- Specify years of experience
|
| 114 |
+
- List notable achievements
|
| 115 |
+
|
| 116 |
+
2. **Add educational background**:
|
| 117 |
+
- Enter degrees, institutions, and dates
|
| 118 |
+
- Highlight academic achievements
|
| 119 |
+
|
| 120 |
+
3. **Define your goals and preferences**:
|
| 121 |
+
- Set career goals
|
| 122 |
+
- Add additional insights
|
| 123 |
+
- Adjust time horizon and factor weights
|
| 124 |
+
|
| 125 |
+
4. **Analyze and review results**:
|
| 126 |
+
- Get personalized career path recommendations
|
| 127 |
+
- See detailed scoring across dimensions
|
| 128 |
+
- Export or share your results
|
| 129 |
+
|
| 130 |
+
## 🤝 Contributing
|
| 131 |
+
|
| 132 |
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
| 133 |
+
|
| 134 |
+
1. Fork the repository
|
| 135 |
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
| 136 |
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
| 137 |
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
| 138 |
+
5. Open a Pull Request
|
| 139 |
+
|
| 140 |
+
## 📄 License
|
| 141 |
+
|
| 142 |
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
| 143 |
+
|
| 144 |
+
## 🙏 Acknowledgements
|
| 145 |
+
|
| 146 |
+
- [OpenAI](https://openai.com/) for providing the underlying language models
|
| 147 |
+
- [Gradio](https://gradio.app/) for the easy-to-use UI framework
|
| 148 |
+
framework
|
| 149 |
+
|
| 150 |
+
---
|
| 151 |
+
|
| 152 |
+
Built with ❤️ for career professionals worldwide
|
TODO.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LinkedIn Career Advice - TODO
|
| 2 |
+
|
| 3 |
+
## Features
|
| 4 |
+
- [ ] Data extraction from PDF
|
| 5 |
+
- [ ] Sharing button to LinkedIn
|
| 6 |
+
- [ ] Optimizing prompts to multiple prompts
|
| 7 |
+
|
| 8 |
+
## Dev
|
| 9 |
+
- [ ] Improve monitoring and logging
|
| 10 |
+
- [ ] Add tests
|
| 11 |
+
- [ ] Add CI/CD
|
app/main.py
CHANGED
|
@@ -3,7 +3,7 @@ import os
|
|
| 3 |
import gradio as gr
|
| 4 |
from dotenv import load_dotenv
|
| 5 |
|
| 6 |
-
from app.constants import ROLE_PLACEHOLDER
|
| 7 |
from app.utils import copy_to_clipboard, export_state
|
| 8 |
from linkedinadvice.career_analysis import CareerAnalyzer
|
| 9 |
from linkedinadvice.monitoring import monitor_api
|
|
@@ -346,10 +346,10 @@ with gr.Blocks(theme="soft") as demo:
|
|
| 346 |
with gr.Column(scale=2):
|
| 347 |
output_box = gr.Markdown(
|
| 348 |
output.value,
|
| 349 |
-
label="Career Analysis Report",
|
| 350 |
container=True,
|
| 351 |
height=614,
|
| 352 |
-
show_copy_button=
|
|
|
|
| 353 |
)
|
| 354 |
|
| 355 |
with gr.Row():
|
|
@@ -403,13 +403,12 @@ with gr.Blocks(theme="soft") as demo:
|
|
| 403 |
fn=lambda: None, inputs=[], outputs=[], js="() => location.reload()"
|
| 404 |
)
|
| 405 |
|
| 406 |
-
"""
|
| 407 |
example_btn.click(
|
| 408 |
fn=lambda _: SAMPLE_RESULT,
|
| 409 |
inputs=[output_box],
|
| 410 |
outputs=[output_box],
|
| 411 |
)
|
| 412 |
-
|
| 413 |
|
| 414 |
# Launch the app
|
| 415 |
if __name__ == "__main__":
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
from dotenv import load_dotenv
|
| 5 |
|
| 6 |
+
from app.constants import ROLE_PLACEHOLDER, SAMPLE_RESULT
|
| 7 |
from app.utils import copy_to_clipboard, export_state
|
| 8 |
from linkedinadvice.career_analysis import CareerAnalyzer
|
| 9 |
from linkedinadvice.monitoring import monitor_api
|
|
|
|
| 346 |
with gr.Column(scale=2):
|
| 347 |
output_box = gr.Markdown(
|
| 348 |
output.value,
|
|
|
|
| 349 |
container=True,
|
| 350 |
height=614,
|
| 351 |
+
show_copy_button=True,
|
| 352 |
+
key="output_box",
|
| 353 |
)
|
| 354 |
|
| 355 |
with gr.Row():
|
|
|
|
| 403 |
fn=lambda: None, inputs=[], outputs=[], js="() => location.reload()"
|
| 404 |
)
|
| 405 |
|
|
|
|
| 406 |
example_btn.click(
|
| 407 |
fn=lambda _: SAMPLE_RESULT,
|
| 408 |
inputs=[output_box],
|
| 409 |
outputs=[output_box],
|
| 410 |
)
|
| 411 |
+
|
| 412 |
|
| 413 |
# Launch the app
|
| 414 |
if __name__ == "__main__":
|
pyproject.toml
CHANGED
|
@@ -10,8 +10,6 @@ readme = "README.md"
|
|
| 10 |
requires-python = ">=3.12"
|
| 11 |
dependencies = [
|
| 12 |
"gradio>=5.22.0",
|
| 13 |
-
"langchain>=0.3.21",
|
| 14 |
-
"langchain-community>=0.3.20",
|
| 15 |
"openai>=1.68.0",
|
| 16 |
"pyperclip>=1.9.0",
|
| 17 |
"python-dotenv>=1.0.1",
|
|
|
|
| 10 |
requires-python = ">=3.12"
|
| 11 |
dependencies = [
|
| 12 |
"gradio>=5.22.0",
|
|
|
|
|
|
|
| 13 |
"openai>=1.68.0",
|
| 14 |
"pyperclip>=1.9.0",
|
| 15 |
"python-dotenv>=1.0.1",
|
requirements.txt
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 |
+
# uv pip compile pyproject.toml -o requirements.txt
|
| 3 |
+
aiofiles==23.2.1
|
| 4 |
+
# via gradio
|
| 5 |
+
annotated-types==0.7.0
|
| 6 |
+
# via pydantic
|
| 7 |
+
anyio==4.9.0
|
| 8 |
+
# via
|
| 9 |
+
# gradio
|
| 10 |
+
# httpx
|
| 11 |
+
# openai
|
| 12 |
+
# starlette
|
| 13 |
+
certifi==2025.1.31
|
| 14 |
+
# via
|
| 15 |
+
# httpcore
|
| 16 |
+
# httpx
|
| 17 |
+
# requests
|
| 18 |
+
charset-normalizer==3.4.1
|
| 19 |
+
# via requests
|
| 20 |
+
click==8.1.8
|
| 21 |
+
# via
|
| 22 |
+
# typer
|
| 23 |
+
# uvicorn
|
| 24 |
+
colorama==0.4.6
|
| 25 |
+
# via
|
| 26 |
+
# click
|
| 27 |
+
# tqdm
|
| 28 |
+
distro==1.9.0
|
| 29 |
+
# via openai
|
| 30 |
+
fastapi==0.115.11
|
| 31 |
+
# via gradio
|
| 32 |
+
ffmpy==0.5.0
|
| 33 |
+
# via gradio
|
| 34 |
+
filelock==3.18.0
|
| 35 |
+
# via huggingface-hub
|
| 36 |
+
fsspec==2025.3.0
|
| 37 |
+
# via
|
| 38 |
+
# gradio-client
|
| 39 |
+
# huggingface-hub
|
| 40 |
+
gradio==5.22.0
|
| 41 |
+
# via linkedinadvice (pyproject.toml)
|
| 42 |
+
gradio-client==1.8.0
|
| 43 |
+
# via gradio
|
| 44 |
+
groovy==0.1.2
|
| 45 |
+
# via gradio
|
| 46 |
+
h11==0.14.0
|
| 47 |
+
# via
|
| 48 |
+
# httpcore
|
| 49 |
+
# uvicorn
|
| 50 |
+
httpcore==1.0.7
|
| 51 |
+
# via httpx
|
| 52 |
+
httpx==0.28.1
|
| 53 |
+
# via
|
| 54 |
+
# gradio
|
| 55 |
+
# gradio-client
|
| 56 |
+
# openai
|
| 57 |
+
# safehttpx
|
| 58 |
+
huggingface-hub==0.29.3
|
| 59 |
+
# via
|
| 60 |
+
# gradio
|
| 61 |
+
# gradio-client
|
| 62 |
+
idna==3.10
|
| 63 |
+
# via
|
| 64 |
+
# anyio
|
| 65 |
+
# httpx
|
| 66 |
+
# requests
|
| 67 |
+
jinja2==3.1.6
|
| 68 |
+
# via gradio
|
| 69 |
+
jiter==0.9.0
|
| 70 |
+
# via openai
|
| 71 |
+
markdown-it-py==3.0.0
|
| 72 |
+
# via rich
|
| 73 |
+
markupsafe==3.0.2
|
| 74 |
+
# via
|
| 75 |
+
# gradio
|
| 76 |
+
# jinja2
|
| 77 |
+
mdurl==0.1.2
|
| 78 |
+
# via markdown-it-py
|
| 79 |
+
numpy==2.2.4
|
| 80 |
+
# via
|
| 81 |
+
# gradio
|
| 82 |
+
# pandas
|
| 83 |
+
openai==1.68.2
|
| 84 |
+
# via linkedinadvice (pyproject.toml)
|
| 85 |
+
orjson==3.10.15
|
| 86 |
+
# via gradio
|
| 87 |
+
packaging==24.2
|
| 88 |
+
# via
|
| 89 |
+
# gradio
|
| 90 |
+
# gradio-client
|
| 91 |
+
# huggingface-hub
|
| 92 |
+
pandas==2.2.3
|
| 93 |
+
# via gradio
|
| 94 |
+
pillow==11.1.0
|
| 95 |
+
# via gradio
|
| 96 |
+
pydantic==2.10.6
|
| 97 |
+
# via
|
| 98 |
+
# fastapi
|
| 99 |
+
# gradio
|
| 100 |
+
# openai
|
| 101 |
+
pydantic-core==2.27.2
|
| 102 |
+
# via pydantic
|
| 103 |
+
pydub==0.25.1
|
| 104 |
+
# via gradio
|
| 105 |
+
pygments==2.19.1
|
| 106 |
+
# via rich
|
| 107 |
+
pyperclip==1.9.0
|
| 108 |
+
# via linkedinadvice (pyproject.toml)
|
| 109 |
+
python-dateutil==2.9.0.post0
|
| 110 |
+
# via pandas
|
| 111 |
+
python-dotenv==1.0.1
|
| 112 |
+
# via linkedinadvice (pyproject.toml)
|
| 113 |
+
python-multipart==0.0.20
|
| 114 |
+
# via gradio
|
| 115 |
+
pytz==2025.1
|
| 116 |
+
# via pandas
|
| 117 |
+
pyyaml==6.0.2
|
| 118 |
+
# via
|
| 119 |
+
# gradio
|
| 120 |
+
# huggingface-hub
|
| 121 |
+
requests==2.32.3
|
| 122 |
+
# via huggingface-hub
|
| 123 |
+
rich==13.9.4
|
| 124 |
+
# via typer
|
| 125 |
+
ruff==0.11.2
|
| 126 |
+
# via gradio
|
| 127 |
+
safehttpx==0.1.6
|
| 128 |
+
# via gradio
|
| 129 |
+
semantic-version==2.10.0
|
| 130 |
+
# via gradio
|
| 131 |
+
shellingham==1.5.4
|
| 132 |
+
# via typer
|
| 133 |
+
six==1.17.0
|
| 134 |
+
# via python-dateutil
|
| 135 |
+
sniffio==1.3.1
|
| 136 |
+
# via
|
| 137 |
+
# anyio
|
| 138 |
+
# openai
|
| 139 |
+
starlette==0.46.1
|
| 140 |
+
# via
|
| 141 |
+
# fastapi
|
| 142 |
+
# gradio
|
| 143 |
+
tomlkit==0.13.2
|
| 144 |
+
# via gradio
|
| 145 |
+
tqdm==4.67.1
|
| 146 |
+
# via
|
| 147 |
+
# huggingface-hub
|
| 148 |
+
# openai
|
| 149 |
+
typer==0.15.2
|
| 150 |
+
# via gradio
|
| 151 |
+
typing-extensions==4.12.2
|
| 152 |
+
# via
|
| 153 |
+
# anyio
|
| 154 |
+
# fastapi
|
| 155 |
+
# gradio
|
| 156 |
+
# gradio-client
|
| 157 |
+
# huggingface-hub
|
| 158 |
+
# openai
|
| 159 |
+
# pydantic
|
| 160 |
+
# pydantic-core
|
| 161 |
+
# typer
|
| 162 |
+
tzdata==2025.1
|
| 163 |
+
# via pandas
|
| 164 |
+
urllib3==2.3.0
|
| 165 |
+
# via requests
|
| 166 |
+
uvicorn==0.34.0
|
| 167 |
+
# via gradio
|
| 168 |
+
websockets==15.0.1
|
| 169 |
+
# via gradio-client
|
uv.lock
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|