Spaces:
Runtime error
Runtime error
add links
Browse files- main.py +6 -1
- match_utils.py +2 -1
- templates/candidate_matcher.html +3 -1
- templates/find_match.html +32 -0
- templates/find_my_match.html +28 -14
main.py
CHANGED
@@ -65,8 +65,13 @@ async def post_matches(request: Request, resume: UploadFile = File(...)):
|
|
65 |
resume = get_resume(resume)
|
66 |
skills = await skillNER(resume)
|
67 |
simResults = await sim_result_loop(resume)
|
|
|
68 |
print(time.time() - t)
|
69 |
-
return templates.TemplateResponse('find_my_match.html', context={'request': request, 'resume': resume, 'skills': skills, 'simResults': simResults})
|
|
|
|
|
|
|
|
|
70 |
|
71 |
@app.get("/find-my-hire/", response_class=HTMLResponse)
|
72 |
def get_hires(request: Request):
|
|
|
65 |
resume = get_resume(resume)
|
66 |
skills = await skillNER(resume)
|
67 |
simResults = await sim_result_loop(resume)
|
68 |
+
links = get_links(simResults)
|
69 |
print(time.time() - t)
|
70 |
+
return templates.TemplateResponse('find_my_match.html', context={'request': request, 'resume': resume, 'skills': skills, 'simResults': simResults, 'links': links})
|
71 |
+
|
72 |
+
@app.get("/find-match/", response_class=HTMLResponse)
|
73 |
+
def find_match(request: Request):
|
74 |
+
return templates.TemplateResponse('find_match.html', context={'request': request})
|
75 |
|
76 |
@app.get("/find-my-hire/", response_class=HTMLResponse)
|
77 |
def get_hires(request: Request):
|
match_utils.py
CHANGED
@@ -104,7 +104,8 @@ async def skillNER(resume):
|
|
104 |
stops = stops.union({'eg', 'ie', 'etc', 'experience', 'experiences', 'experienced', 'experiencing', 'knowledge',
|
105 |
'ability', 'abilities', 'skill', 'skills', 'skilled', 'including', 'includes', 'included', 'include'
|
106 |
'education', 'follow', 'following', 'follows', 'followed', 'make', 'made', 'makes', 'making', 'maker',
|
107 |
-
'available', 'large', 'larger', 'largescale', 'client', 'clients', 'responsible', 'x', 'many', 'team', 'teams'
|
|
|
108 |
resume = [word for word in SpaceTokenizer().tokenize(resume) if word not in stops]
|
109 |
resume = [word for word in resume if ")" not in word]
|
110 |
resume = [word for word in resume if "(" not in word]
|
|
|
104 |
stops = stops.union({'eg', 'ie', 'etc', 'experience', 'experiences', 'experienced', 'experiencing', 'knowledge',
|
105 |
'ability', 'abilities', 'skill', 'skills', 'skilled', 'including', 'includes', 'included', 'include'
|
106 |
'education', 'follow', 'following', 'follows', 'followed', 'make', 'made', 'makes', 'making', 'maker',
|
107 |
+
'available', 'large', 'larger', 'largescale', 'client', 'clients', 'responsible', 'x', 'many', 'team', 'teams',
|
108 |
+
'concern', 'concerned', 'concerning', 'concerns', 'space', 'spaces', 'spaced'})
|
109 |
resume = [word for word in SpaceTokenizer().tokenize(resume) if word not in stops]
|
110 |
resume = [word for word in resume if ")" not in word]
|
111 |
resume = [word for word in resume if "(" not in word]
|
templates/candidate_matcher.html
CHANGED
@@ -43,7 +43,8 @@
|
|
43 |
</article>
|
44 |
<article class="output__section">
|
45 |
<h2 class="output__subtitle">We Think Your Job Description Most Closely Matches these Roles</h2>
|
46 |
-
<p class="alert">
|
|
|
47 |
<form action="/find-hire/" class="selection__form" method="GET">
|
48 |
<table>
|
49 |
<thead class="output__list">
|
@@ -67,6 +68,7 @@
|
|
67 |
</tbody>
|
68 |
</table>
|
69 |
<br>
|
|
|
70 |
<div class="radio__submit">
|
71 |
<button type="submit" class="radio__submit">Submit</button>
|
72 |
</div>
|
|
|
43 |
</article>
|
44 |
<article class="output__section">
|
45 |
<h2 class="output__subtitle">We Think Your Job Description Most Closely Matches these Roles</h2>
|
46 |
+
<p class="alert">(Note: You can click on the links to find out more.)</p>
|
47 |
+
<p class="alert">Instructions: When you have decided which job title is most closely aligned with your job description, choose the corresponding radio button and click "Submit."</p>
|
48 |
<form action="/find-hire/" class="selection__form" method="GET">
|
49 |
<table>
|
50 |
<thead class="output__list">
|
|
|
68 |
</tbody>
|
69 |
</table>
|
70 |
<br>
|
71 |
+
<br>
|
72 |
<div class="radio__submit">
|
73 |
<button type="submit" class="radio__submit">Submit</button>
|
74 |
</div>
|
templates/find_match.html
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Dashboard</title>
|
8 |
+
<link rel="stylesheet" href="/static/styles.css">
|
9 |
+
</head>
|
10 |
+
<body>
|
11 |
+
<header class="navbar">
|
12 |
+
<div class="navbar__brand">
|
13 |
+
<img src="/static/PF.png" class="navbar__logo" alt="Pathfinder logo" />
|
14 |
+
<a href="/" class="navbar__logo">Pathfinder</a>
|
15 |
+
</div>
|
16 |
+
<ul class="navbar__navigation">
|
17 |
+
<li class="navbar__navigation-item"><a href="/explore-job-neighborhoods/" class="navbar__link">Explore Job Neighborhoods</a></li>
|
18 |
+
<li class="navbar__navigation-item"><a href="/find-my-match/" class="navbar__link">Find My Match</a></li>
|
19 |
+
<li class="navbar__navigation-item"><a href="/find-my-hire/" class="navbar__link">Find My Next Hire</a></li>
|
20 |
+
</ul>
|
21 |
+
</header>
|
22 |
+
<main class="main">
|
23 |
+
<h1 class="pagetitle">Under Construction</h1>
|
24 |
+
<h2 class="pagesubtitle">We're sorry! This page is currently under construction. Please check back soon!</h2>
|
25 |
+
</main>
|
26 |
+
<footer class="footer">
|
27 |
+
<ul class="footer__text">
|
28 |
+
<li class="footer__text-item">© 2023 Pathfinder</li>
|
29 |
+
</ul>
|
30 |
+
</footer>
|
31 |
+
</body>
|
32 |
+
</html>
|
templates/find_my_match.html
CHANGED
@@ -43,22 +43,36 @@
|
|
43 |
</article>
|
44 |
<article class="output__section">
|
45 |
<h2 class="output__subtitle">Job Matches</h3>
|
46 |
-
<
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
</tr>
|
52 |
-
</thead>
|
53 |
-
<tbody class="output__list">
|
54 |
-
{% for n in range(1,11) %}
|
55 |
<tr>
|
56 |
-
<th class="output__list-
|
57 |
-
<
|
58 |
</tr>
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
</article>
|
63 |
{% endif %}
|
64 |
</section>
|
|
|
43 |
</article>
|
44 |
<article class="output__section">
|
45 |
<h2 class="output__subtitle">Job Matches</h3>
|
46 |
+
<p class="alert">(Note: You can click on the links to find out more.)</p>
|
47 |
+
<p class="alert">Instructions: When you have decided which job title is most closely aligned with your skills and interests, choose the corresponding radio button and click "Submit."</p>
|
48 |
+
<form action="/find-match/" class="selection__form" method="GET">
|
49 |
+
<table>
|
50 |
+
<thead class="output__list">
|
|
|
|
|
|
|
|
|
51 |
<tr>
|
52 |
+
<th class="output__list-coloreditem">Job Title</th>
|
53 |
+
<th class="output__list-coloreditem" scope="col">Match Score</th>
|
54 |
</tr>
|
55 |
+
</thead>
|
56 |
+
<tbody class="output__list" style="text-align: left">
|
57 |
+
{% for n in range(1,11) %}
|
58 |
+
<tr>
|
59 |
+
<th class="output__list-item" scope="row">
|
60 |
+
<input type="radio" id="jobselection" name="jobselection" class="jobselection" value={{ simResults.loc[n, 'JobTitle'] }} />
|
61 |
+
<a class="output__table-item" href={{ links[n] }}>{{ simResults.loc[n, 'JobTitle'] }}</a>
|
62 |
+
</th>
|
63 |
+
<td class="output__list-item" style="text-align: center">
|
64 |
+
{{ simResults.loc[n, 'Similarity'] }}
|
65 |
+
</td>
|
66 |
+
</tr>
|
67 |
+
{% endfor %}
|
68 |
+
</tbody>
|
69 |
+
</table>
|
70 |
+
<br>
|
71 |
+
<br>
|
72 |
+
<div class="radio__submit">
|
73 |
+
<button type="submit" class="radio__submit">Submit</button>
|
74 |
+
</div>
|
75 |
+
</form>
|
76 |
</article>
|
77 |
{% endif %}
|
78 |
</section>
|