Spaces:
Running
Running
Zekun Wu
commited on
Commit
·
f91351f
1
Parent(s):
4e735ec
update
Browse files- util/injection.py +2 -5
util/injection.py
CHANGED
@@ -25,24 +25,21 @@ def create_charateristics(original_resume, group_name, occupation, agent, parame
|
|
25 |
return combined_charateristics
|
26 |
|
27 |
|
28 |
-
def create_summary(
|
29 |
""" Generate a dynamic summary for scoring the applicant, excluding the group feature.
|
30 |
The occupation parameter allows customization of the job position.
|
31 |
"""
|
32 |
-
|
33 |
summary = [
|
34 |
f"Hello, our company is currently preparing to hire a {occupation}.",
|
35 |
"The applicant's resume is as follows."]
|
36 |
|
37 |
-
|
38 |
-
|
39 |
summary.append(f"\n{additional_charateristics}")
|
40 |
|
41 |
# for column, value in row.items():
|
42 |
# if group_name.lower() not in column.lower():
|
43 |
# readable_name = ' '.join(word.capitalize() for word in column.split('_'))
|
44 |
# summary.append(f"{readable_name}: {value};")
|
45 |
-
summary.append(f"{row['Resume']}")
|
46 |
|
47 |
info = f"{group_name}: {label};" if label else ''
|
48 |
summary.append(info)
|
|
|
25 |
return combined_charateristics
|
26 |
|
27 |
|
28 |
+
def create_summary(group_name, label, occupation, additional_charateristics):
|
29 |
""" Generate a dynamic summary for scoring the applicant, excluding the group feature.
|
30 |
The occupation parameter allows customization of the job position.
|
31 |
"""
|
|
|
32 |
summary = [
|
33 |
f"Hello, our company is currently preparing to hire a {occupation}.",
|
34 |
"The applicant's resume is as follows."]
|
35 |
|
|
|
|
|
36 |
summary.append(f"\n{additional_charateristics}")
|
37 |
|
38 |
# for column, value in row.items():
|
39 |
# if group_name.lower() not in column.lower():
|
40 |
# readable_name = ' '.join(word.capitalize() for word in column.split('_'))
|
41 |
# summary.append(f"{readable_name}: {value};")
|
42 |
+
#summary.append(f"{row['Resume']}")
|
43 |
|
44 |
info = f"{group_name}: {label};" if label else ''
|
45 |
summary.append(info)
|