generative-ai
generative-ai copied to clipboard
feat: Added notebook to demonstrate resume generation using gemini
- [x] Follow the
CONTRIBUTINGGuide. - [x] You are listed as the author in your notebook or README file.
- [ ] Your account is listed in
CODEOWNERSfor the file(s). - [x] Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
- [x] Ensure the tests and linter pass (Run
nox -s formatfrom the repository root to format). - [x] Appropriate docs were updated (if necessary)
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Please change your variable/constant names to be more descriptive of what they are doing and to satisfy the spell checker
Updated changes
I got this error when running the final cell of the notebook:
{
"name": "KeyError",
"message": "'personal_information'",
"stack": "---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[14], line 33
7 sample_job_description = \"\"\"
8 PHP Developer
9 Job Description
(...)
29 •Ability to work well independently and with others.
30 \"\"\"
32 generated_resume = get_response(parsed_resume, sample_job_description)
---> 33 structured_resume = structure_response(generated_resume)
34 print(f\"Generated Resume \
{structured_resume}\")
Cell In[12], line 15, in structure_response(resume_generated)
12 response_str = \"\"
14 for k in resume_structure:
---> 15 block, block_info = k, resume_generated[k]
16 response_str = f\"{response_str}\
{block}\
\"
17 if isinstance(block_info, list):
KeyError: 'personal_information'"
}
I got this error when running the final cell of the notebook:
{ "name": "KeyError", "message": "'personal_information'", "stack": "--------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[14], line 33 7 sample_job_description = \"\"\" 8 PHP Developer 9 Job Description (...) 29 •Ability to work well independently and with others. 30 \"\"\" 32 generated_resume = get_response(parsed_resume, sample_job_description) ---> 33 structured_resume = structure_response(generated_resume) 34 print(f\"Generated Resume \ {structured_resume}\") Cell In[12], line 15, in structure_response(resume_generated) 12 response_str = \"\" 14 for k in resume_structure: ---> 15 block, block_info = k, resume_generated[k] 16 response_str = f\"{response_str}\ {block}\ \" 17 if isinstance(block_info, list): KeyError: 'personal_information'" }
This error comes up because sometime gemini is not able to extract the personal information section. I have added an error trap here.