Skip to content

Commit

Permalink
Merge pull request #31 from Ztrimus/30-llama-31-integration
Browse files Browse the repository at this point in the history
Langchain and Llama 3.1 Integration
  • Loading branch information
Ztrimus authored Aug 24, 2024
2 parents 66bfaa9 + a9437ef commit db2852c
Show file tree
Hide file tree
Showing 36 changed files with 2,616 additions and 1,506 deletions.
1 change: 0 additions & 1 deletion .anima/.gitignore

This file was deleted.

33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"customizations": {
"codespaces": {
"openFiles": [
"README.md",
"web_app.py"
]
},
"vscode": {
"settings": {},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}
},
"updateContentCommand": "[ -f packages.txt ] && sudo apt update && sudo apt upgrade -y && sudo xargs apt install -y <packages.txt; [ -f requirements.txt ] && pip3 install --user -r requirements.txt; pip3 install --user streamlit; echo '✅ Packages installed and Requirements met'",
"postAttachCommand": {
"server": "streamlit run web_app.py --server.enableCORS false --server.enableXsrfProtection false"
},
"portsAttributes": {
"8501": {
"label": "Application",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [
8501
]
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ __pycache__
.env
output
*.DS_Store
dist
dist
.venv
.anima
7 changes: 2 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
"justMyCode": true,
// "args": [
// "-u",
// "https://www.linkedin.com/jobs/view/3970870027",
// "-p",
// "openai",
// "https://www.linkedin.com/jobs/view/4003781804",
// "-m",
// "https://www.linkedin.com/in/keval-shah14/"
// // "/Users/saurabh/AA/convergent/projects/job-llm/zlm/demo_data/user_resume.pdf"
// "/Users/saurabh/AA/convergent/projects/job-llm/zlm/demo_data/user_profile.json"
// ],
"args": ["run", "web_app.py"]
}
Expand Down
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ cd job-llm
brew install basictex
sudo tlmgr install enumitem fontawesome
```
5. Run following script to get result
5. If you want to run ollama models
```sh
ollama pull llama3.1
```
6. Run following script to get result
```bash
>>> python main.py /
--url "JOB_POSTING_URL" /
Expand All @@ -119,6 +123,22 @@ cd job-llm
## 3. Citations
If you find JobLLM useful in your research or applications, please consider giving us a star 🌟 and citing it.

```bibtex
@inproceedings{10.1145/3626772.3657680,
author = {Zinjad, Saurabh Bhausaheb and Bhattacharjee, Amrita and Bhilegaonkar, Amey and Liu, Huan},
title = {ResumeFlow: An LLM-facilitated Pipeline for Personalized Resume Generation and Refinement},
series = {SIGIR '24},
booktitle = {Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval},
publisher = {Association for Computing Machinery},
doi = {10.1145/3626772.3657680},
url = {https://doi.org/10.1145/3626772.3657680},
year = {2024},
isbn = {9798400704314},
location = {Washington DC, USA},
address = {New York, NY, USA},
}
```
```bibtex
@misc{zinjad2024resumeflow,
title={ResumeFlow: An LLM-facilitated Pipeline for Personalized Resume Generation and Refinement},
Expand All @@ -133,6 +153,15 @@ If you find JobLLM useful in your research or applications, please consider givi
## 4. License
JobLLM is under the MIT License and is supported for commercial usage.
## 5. TODO
Need to find way to install following command in streamlit
```sh
ollama
playwright
"ollama pull llama3.1"
"ollama pull bge-m3"
```
## 4. References
- [Prompt engineering Guidelines](https://platform.openai.com/docs/guides/prompt-engineering)
- [Overleaf LaTex Resume Template](https://www.overleaf.com/latex/templates/jakes-resume-anonymous/cstpnrbkhndn)
Expand Down
10 changes: 6 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from zlm import AutoApplyModel


def create_resume_cv(url, master_data, api_key, provider, downloads_dir):
def create_resume_cv(url, master_data, api_key, provider, model, downloads_dir):
"""
Creates a resume or CV using the Job-LLM model.
Expand All @@ -21,12 +21,13 @@ def create_resume_cv(url, master_data, api_key, provider, downloads_dir):
master_data (dict): The master data containing information about the candidate.
api_key (str): The API key for OpenAI.
provider (str): The LLM provider to use. Currently, only "OpenAI, Gemini" is supported.
model (str): The LLM model to use.
downloads_dir (str): The directory where the generated resume or CV will be saved.
Returns:
None
"""
job_llm = AutoApplyModel(api_key, provider, downloads_dir)
job_llm = AutoApplyModel(api_key, provider, model, downloads_dir)
job_llm.resume_cv_pipeline(url, master_data)


Expand All @@ -40,11 +41,12 @@ def create_resume_cv(url, master_data, api_key, provider, downloads_dir):
parser.add_argument("-m", "--master_data", help="Path of user's master data file.")
parser.add_argument("-k", "--api_key", default="os", help="LLM Provider API Keys")
parser.add_argument("-d", "--downloads_dir", help="Give detailed path of folder")
parser.add_argument("-p", "--provider", default="gemini", help="LLM provider name. support for openai, gemini")
parser.add_argument("-p", "--provider", help="LLM provider name. support for openai, gemini")
parser.add_argument("-l", "--model", help="LLM model name")

# Parse the arguments
args = parser.parse_args()

create_resume_cv(
args.url, args.master_data, args.api_key, args.provider, args.downloads_dir
args.url, args.master_data, args.api_key, args.provider, args.model, args.downloads_dir
)
2 changes: 2 additions & 0 deletions packages.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
libgbm1
libasound2
texlive-latex-base
texlive-fonts-recommended
texlive-fonts-extra
Expand Down
Loading

0 comments on commit db2852c

Please sign in to comment.