Spaces:
Runtime error
Runtime error
Caitlin Blackmore
commited on
Commit
·
ebe0782
1
Parent(s):
2f1b978
add styling to table
Browse files- main.py +1 -2
- static/styles.css +8 -2
- templates/candidate_matcher.html +6 -6
main.py
CHANGED
|
@@ -81,9 +81,8 @@ async def post_matches(request: Request, jobdesc: UploadFile = File(...)):
|
|
| 81 |
simResults = await sim_result_loop(jobdesc)
|
| 82 |
links = get_links(simResults)
|
| 83 |
print(time.time() - t)
|
| 84 |
-
print(links)
|
| 85 |
return templates.TemplateResponse('candidate_matcher.html', context={'request': request, 'jobdesc': jobdesc, 'skills': skills, 'simResults': simResults, 'links': links})
|
| 86 |
|
| 87 |
@app.get("/find-hire/", response_class=HTMLResponse)
|
| 88 |
def find_hire(request: Request):
|
| 89 |
-
return templates.TemplateResponse('find_hire.html', context={'request': request})
|
|
|
|
| 81 |
simResults = await sim_result_loop(jobdesc)
|
| 82 |
links = get_links(simResults)
|
| 83 |
print(time.time() - t)
|
|
|
|
| 84 |
return templates.TemplateResponse('candidate_matcher.html', context={'request': request, 'jobdesc': jobdesc, 'skills': skills, 'simResults': simResults, 'links': links})
|
| 85 |
|
| 86 |
@app.get("/find-hire/", response_class=HTMLResponse)
|
| 87 |
def find_hire(request: Request):
|
| 88 |
+
return templates.TemplateResponse('find_hire.html', context={'request': request})
|
static/styles.css
CHANGED
|
@@ -224,13 +224,19 @@ html {
|
|
| 224 |
font-weight: bold;
|
| 225 |
}
|
| 226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
.output__table-item {
|
| 228 |
font-size: 14px;
|
| 229 |
color: #2c2161;
|
| 230 |
-
margin-bottom: 10px;
|
| 231 |
-
margin-right: 10px;
|
| 232 |
text-align: left;
|
|
|
|
| 233 |
}
|
|
|
|
| 234 |
.footer {
|
| 235 |
background-color: #323f43;
|
| 236 |
padding: 40px 0;
|
|
|
|
| 224 |
font-weight: bold;
|
| 225 |
}
|
| 226 |
|
| 227 |
+
.selection__form {
|
| 228 |
+
display: table-row-group;
|
| 229 |
+
vertical-align: left;
|
| 230 |
+
align-content: left;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
.output__table-item {
|
| 234 |
font-size: 14px;
|
| 235 |
color: #2c2161;
|
|
|
|
|
|
|
| 236 |
text-align: left;
|
| 237 |
+
align-self: flex-start;
|
| 238 |
}
|
| 239 |
+
|
| 240 |
.footer {
|
| 241 |
background-color: #323f43;
|
| 242 |
padding: 40px 0;
|
templates/candidate_matcher.html
CHANGED
|
@@ -30,7 +30,7 @@
|
|
| 30 |
<section class="output">
|
| 31 |
{% if jobdesc %}
|
| 32 |
<article class="output__section">
|
| 33 |
-
<h2 class="output__subtitle">Extracted Skills</
|
| 34 |
<ul>
|
| 35 |
{% for word in jobdesc.lower().replace("-"," ").replace(")","").replace("(","").replace(":","").replace(",","").replace("/"," ").split(" ") %}
|
| 36 |
{% if skills.get(word) == "Skill" %}
|
|
@@ -42,9 +42,9 @@
|
|
| 42 |
</ul>
|
| 43 |
</article>
|
| 44 |
<article class="output__section">
|
| 45 |
-
<h2 class="output__subtitle">We Think Your Job Description Most Closely Matches these Roles</
|
| 46 |
<p class="alert">Click on the links to find out more. When you have decided which job title is most closely aligned with your job description, click "Submit."</p>
|
| 47 |
-
<form action="/find-hire/" method="GET">
|
| 48 |
<table>
|
| 49 |
<thead class="output__list">
|
| 50 |
<tr>
|
|
@@ -52,14 +52,14 @@
|
|
| 52 |
<th class="output__list-coloreditem" scope="col">Match Score</th>
|
| 53 |
</tr>
|
| 54 |
</thead>
|
| 55 |
-
<tbody class="output__table"
|
| 56 |
{% for n in range(1,11) %}
|
| 57 |
<tr>
|
| 58 |
<th class="output__list-item" scope="row">
|
| 59 |
-
<input type="radio" id="jobselection" name="jobselection" value={{ simResults.loc[n, 'JobTitle'] }}
|
| 60 |
<a class="output__table-item" href={{ links[n] }}>{{ simResults.loc[n, 'JobTitle'] }}</a>
|
| 61 |
</th>
|
| 62 |
-
<td class="output__list-item">
|
| 63 |
{{ simResults.loc[n, 'Similarity'] }}
|
| 64 |
</td>
|
| 65 |
</tr>
|
|
|
|
| 30 |
<section class="output">
|
| 31 |
{% if jobdesc %}
|
| 32 |
<article class="output__section">
|
| 33 |
+
<h2 class="output__subtitle">Extracted Skills</h2>
|
| 34 |
<ul>
|
| 35 |
{% for word in jobdesc.lower().replace("-"," ").replace(")","").replace("(","").replace(":","").replace(",","").replace("/"," ").split(" ") %}
|
| 36 |
{% if skills.get(word) == "Skill" %}
|
|
|
|
| 42 |
</ul>
|
| 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">Click on the links to find out more. When you have decided which job title is most closely aligned with your job description, click "Submit."</p>
|
| 47 |
+
<form action="/find-hire/" class="selection__form" method="GET">
|
| 48 |
<table>
|
| 49 |
<thead class="output__list">
|
| 50 |
<tr>
|
|
|
|
| 52 |
<th class="output__list-coloreditem" scope="col">Match Score</th>
|
| 53 |
</tr>
|
| 54 |
</thead>
|
| 55 |
+
<tbody class="output__table" style="text-align: left">
|
| 56 |
{% for n in range(1,11) %}
|
| 57 |
<tr>
|
| 58 |
<th class="output__list-item" scope="row">
|
| 59 |
+
<input type="radio" id="jobselection" name="jobselection" class="jobselection" value={{ simResults.loc[n, 'JobTitle'] }} />
|
| 60 |
<a class="output__table-item" href={{ links[n] }}>{{ simResults.loc[n, 'JobTitle'] }}</a>
|
| 61 |
</th>
|
| 62 |
+
<td class="output__list-item" style="text-align: center">
|
| 63 |
{{ simResults.loc[n, 'Similarity'] }}
|
| 64 |
</td>
|
| 65 |
</tr>
|