-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
140 lines (139 loc) · 4.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-..." crossorigin="anonymous" />
<title>GPT Recruiter</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f8f9fa;
margin: 0;
padding: 20px;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
background: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #333;
}
textarea {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ddd;
border-radius: 5px;
}
button {
width: 100%;
padding: 15px;
margin: 10px 0;
background: #34568B;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background: #2d4b78;
}
.result {
margin: 20px 0;
padding: 10px;
border-radius: 5px;
background: #f1f1f1;
}
.gradient-bar {
height: 30px;
border-radius: 5px;
background: linear-gradient(to right, red, 45%, green);
margin: 10px 0;
}
.score-indicator {
height: 100%;
background: #34568B;
text-align: center;
line-height: 30px;
font-weight: bold;
border-radius: 5px;
color: #fff;
width: 0; /* Start with zero width */
transition: width 0.5s ease; /* Smooth transition */
}
footer {
text-align: center;
margin-top: 20px;
padding: 10px 0;
color: #000000;
border-radius: 5px;
}
footer ul {
list-style-type: none;
padding: 0;
}
footer ul li {
display: inline-block;
margin-right: 10px;
}
footer a {
text-decoration: none;
font-size: 24px;
color: #000000;
}
footer a:hover {
opacity: 0.8;
}
</style>
</head>
<body>
<div class="container">
<h1>GPT Recruiter</h1>
<textarea id="job-description" rows="6" placeholder="Paste job description here"></textarea>
<textarea id="resume-text" rows="6" placeholder="Paste resume here"></textarea>
<button onclick="evaluateCandidate()">Evaluate</button>
<div class="result" id="result">
<div class="gradient-bar">
<div class="score-indicator" id="score-indicator"></div>
</div>
<p id="quality-score">Quality Score: </p>
<p id="reject-reason">Missing Qualifications: </p>
</div>
</div>
<footer>
<ul>
<li><a href="https://www.linkedin.com/in/jay-snellings/"><i class="fab fa-linkedin"></i></a></li>
<li><a href="https://github.com/Jay11682"><i class="fab fa-github"></i></a></li>
</ul>
<p>© 2024 Jay Snellings. All Rights Reserved.</p>
</footer>
<script>
function evaluateCandidate() {
const jobDescription = document.getElementById('job-description').value;
const resumeText = document.getElementById('resume-text').value;
fetch('/evaluate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ job_description: jobDescription, resume_text: resumeText }),
})
.then(response => response.json())
.then(data => {
// Update UI elements with response data
document.getElementById('score-indicator').style.width = `${data.quality_score * 10}%`; // Scale to 0-100% for width
document.getElementById('quality-score').textContent = `Quality Score: ${data.quality_score}`;
document.getElementById('reject-reason').textContent = `Missing Qualifications: ${data.reject_reason}`;
})
.catch(error => console.error('Error:', error));
}
</script>
</body>
</html>