generative-ai icon indicating copy to clipboard operation
generative-ai copied to clipboard

feat: Added notebook to demonstrate resume generation using gemini

Open lazyprgmr opened this issue 1 year ago • 4 comments

  • [x] Follow the CONTRIBUTING Guide.
  • [x] You are listed as the author in your notebook or README file.
  • [ ] Your account is listed in CODEOWNERS for 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 format from the repository root to format).
  • [x] Appropriate docs were updated (if necessary)

lazyprgmr avatar Oct 29 '24 08:10 lazyprgmr

Check out this pull request on  ReviewNB

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

lazyprgmr avatar Nov 21 '24 06:11 lazyprgmr

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'"
}

holtskinner avatar Nov 21 '24 18:11 holtskinner

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.

lazyprgmr avatar Nov 22 '24 04:11 lazyprgmr