willn9 commited on
Commit
87a3780
·
verified ·
1 Parent(s): 016231e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -12,10 +12,9 @@ def respond(
12
  system_message,
13
  role,
14
  ad,
 
15
  education,
16
- experience,
17
  skills,
18
- ask_for_skills_suggestions,
19
  max_tokens,
20
  temperature,
21
  top_p,
@@ -23,10 +22,10 @@ def respond(
23
  # Construct the system message
24
  enhanced_system_message = (
25
  f"{system_message}\n\n"
26
- f"Role, Industry and Type of Organization: {role}\n"
27
- f"Job Ad Responsibilities and Key Requirements: {ad}\n"
28
- f"Education, Training and Certifications: {education}\n"
29
- f"Work Experience: {experience}\n"
30
  f"Skills: {skills}\n"
31
  )
32
 
@@ -46,7 +45,7 @@ def respond(
46
  response_text = ""
47
  try:
48
  response = client.chat.completions.create(
49
- model="gpt-4o", # use "gpt-4o-mini" when officially available
50
  messages=messages,
51
  max_tokens=max_tokens,
52
  temperature=temperature,
@@ -72,17 +71,17 @@ demo = gr.ChatInterface(
72
  gr.Textbox(label="Role, Industry and Employer", placeholder="Describe the role, industry and employer you are applying to."),
73
  gr.Textbox(
74
  label="Job Ad Responsibilities",
75
- placeholder="Describe the Responsibilities and Key Requirements advertised in the job ad",
76
  ),
77
  gr.Textbox(
78
  label=" Job Key Requirements ",
79
- placeholder="Describe your education, training, certifications and professional designations",
80
  ),
81
  gr.Textbox(
82
  label="A Summary about your Education and Work Experience",
83
- placeholder="Describe your education, certifications, skills, work experience, previous responsibilities and key career achievements",
84
  ),
85
- gr.Textbox(label="Skills", placeholder="List your key skills that match this job or ask for suggestions"),
86
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
87
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
88
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
 
12
  system_message,
13
  role,
14
  ad,
15
+ requirements,
16
  education,
 
17
  skills,
 
18
  max_tokens,
19
  temperature,
20
  top_p,
 
22
  # Construct the system message
23
  enhanced_system_message = (
24
  f"{system_message}\n\n"
25
+ f"Role, Industry and Employer: {role}\n"
26
+ f"Job Ad Responsibilities: {ad}\n"
27
+ f"Job Key Requirements: {requiements}\n"
28
+ f"A Summary about the User's Education and Work Experience: {education}\n"
29
  f"Skills: {skills}\n"
30
  )
31
 
 
45
  response_text = ""
46
  try:
47
  response = client.chat.completions.create(
48
+ model="gpt-4o-mini", # use "gpt-4o" if needed
49
  messages=messages,
50
  max_tokens=max_tokens,
51
  temperature=temperature,
 
71
  gr.Textbox(label="Role, Industry and Employer", placeholder="Describe the role, industry and employer you are applying to."),
72
  gr.Textbox(
73
  label="Job Ad Responsibilities",
74
+ placeholder="Summarize the Responsibilities advertised in the job ad",
75
  ),
76
  gr.Textbox(
77
  label=" Job Key Requirements ",
78
+ placeholder="Summarize the key requirements advertised in the job ad",
79
  ),
80
  gr.Textbox(
81
  label="A Summary about your Education and Work Experience",
82
+ placeholder="Describe your education, certifications, work experience, previous responsibilities and key career achievements",
83
  ),
84
+ gr.Textbox(label="Skills", placeholder="List your key skills that match this job"),
85
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
86
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
87
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),