david-thrower commited on
Commit
baf47ca
·
1 Parent(s): 989441e

Removed debug screens. Made the 1.7B model the new default.

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -6,7 +6,8 @@ import torch
6
  from duckduckgo_search import DDGS
7
 
8
  # Load the SmolLM model and tokenizer
9
- model_name = "HuggingFaceTB/SmolLM2-360M-Instruct"
 
10
  model = AutoModelForCausalLM.from_pretrained(model_name)
11
  tokenizer = AutoTokenizer.from_pretrained(model_name)
12
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
@@ -234,7 +235,7 @@ Please follow these best practices to make the resume optimized for the ATS visi
234
  - Replace generic duties with achievement-focused statements (e.g., "Handled customer service" → "Resolved 50+ customer inquiries daily, improving satisfaction by 30%").
235
 
236
  16. **Keyword Density Balance**
237
- - Ensure keywords are distributed naturally across sections without overuse (e.g., 2-3 mentions of a critical keyword in work experience vs. 10 in a skills list)."
238
  - Instruct the user to paste this into a suitable word processor and use the result to build a resume. Save it in word, then in PDF (JaneDoe_Resume_CompanyName.pdf). Submit the PDF.
239
 
240
 
@@ -361,7 +362,7 @@ with demo:
361
  job_description = gr.TextArea(label="Paste Job Description")
362
  resume = gr.TextArea(label="Paste Resume")
363
 
364
- job_and_company_info_output = gr.JSON(label="Job and Company Info")
365
  role_output = gr.State()
366
  gap_assessment_prompt_output = gr.TextArea(label="Gap Assessment Prompt")
367
 
@@ -373,13 +374,11 @@ with demo:
373
 
374
  gr.Markdown("## Gap Assessment")
375
  gap_assessment_result = gr.TextArea(label="Paste Gap Assessment Result")
376
- gap_assessment_result_output = gr.TextArea(label="Submitted Gap Assessment Result", interactive=False)
377
  key_accomplishments_and_skills_prompt_output = gr.TextArea(label="Key Accomplishments and Skills Prompt", interactive=False)
378
 
379
  gr.Button("Submit Gap Assessment Result").click(
380
  lambda x: x,
381
  inputs=[gap_assessment_result],
382
- outputs=gap_assessment_result_output
383
  ).then(
384
  generate_key_accomplishments_and_skills_prompt,
385
  inputs=[job_and_company_info_output, resume],
@@ -388,16 +387,14 @@ with demo:
388
 
389
  gr.Markdown("## Key Accomplishments and Skills")
390
  key_accomplishments_and_skills_result = gr.TextArea(label="Paste Key Accomplishments and Skills Result")
391
- key_accomplishments_and_skills_result_output = gr.TextArea(label="Submitted Key Accomplishments and Skills Result", interactive=False)
392
  resume_prompt_output = gr.TextArea(label="Resume Prompt")
393
 
394
  gr.Button("Submit Key Accomplishments and Skills Result").click(
395
  lambda x: x,
396
  inputs=[key_accomplishments_and_skills_result],
397
- outputs=key_accomplishments_and_skills_result_output
398
  ).then(
399
  generate_resume_prompt,
400
- inputs=[job_and_company_info_output, resume, gap_assessment_result_output, key_accomplishments_and_skills_result_output],
401
  outputs=resume_prompt_output
402
  )
403
 
 
6
  from duckduckgo_search import DDGS
7
 
8
  # Load the SmolLM model and tokenizer
9
+ # model_name = "HuggingFaceTB/SmolLM2-360M-Instruct"
10
+ model_name = "HuggingFaceTB/SmolLM2-1.7B-Instruct"
11
  model = AutoModelForCausalLM.from_pretrained(model_name)
12
  tokenizer = AutoTokenizer.from_pretrained(model_name)
13
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
235
  - Replace generic duties with achievement-focused statements (e.g., "Handled customer service" → "Resolved 50+ customer inquiries daily, improving satisfaction by 30%").
236
 
237
  16. **Keyword Density Balance**
238
+ - Ensure keywords are distributed naturally across sections without overuse (e.g., 2-3 mentions of a critical keyword in work experience vs. 10 in a skills list).
239
  - Instruct the user to paste this into a suitable word processor and use the result to build a resume. Save it in word, then in PDF (JaneDoe_Resume_CompanyName.pdf). Submit the PDF.
240
 
241
 
 
362
  job_description = gr.TextArea(label="Paste Job Description")
363
  resume = gr.TextArea(label="Paste Resume")
364
 
365
+ job_and_company_info_output = gr.State()
366
  role_output = gr.State()
367
  gap_assessment_prompt_output = gr.TextArea(label="Gap Assessment Prompt")
368
 
 
374
 
375
  gr.Markdown("## Gap Assessment")
376
  gap_assessment_result = gr.TextArea(label="Paste Gap Assessment Result")
 
377
  key_accomplishments_and_skills_prompt_output = gr.TextArea(label="Key Accomplishments and Skills Prompt", interactive=False)
378
 
379
  gr.Button("Submit Gap Assessment Result").click(
380
  lambda x: x,
381
  inputs=[gap_assessment_result],
 
382
  ).then(
383
  generate_key_accomplishments_and_skills_prompt,
384
  inputs=[job_and_company_info_output, resume],
 
387
 
388
  gr.Markdown("## Key Accomplishments and Skills")
389
  key_accomplishments_and_skills_result = gr.TextArea(label="Paste Key Accomplishments and Skills Result")
 
390
  resume_prompt_output = gr.TextArea(label="Resume Prompt")
391
 
392
  gr.Button("Submit Key Accomplishments and Skills Result").click(
393
  lambda x: x,
394
  inputs=[key_accomplishments_and_skills_result],
 
395
  ).then(
396
  generate_resume_prompt,
397
+ inputs=[job_and_company_info_output, resume, gap_assessment_result, key_accomplishments_and_skills_result],
398
  outputs=resume_prompt_output
399
  )
400