rca123456 commited on
Commit
07c26b6
·
verified ·
1 Parent(s): 02568ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +162 -44
app.py CHANGED
@@ -56,21 +56,56 @@ def suggest_certifications(missing_skills):
56
 
57
  def generate_circular_progress(percentage):
58
  html_code = f"""
59
- <div style='position: relative; width: 180px; height: 180px; border-radius: 50%; display: flex; align-items: center; justify-content: center;'>
60
- <div style='position: absolute; width: 180px; height: 180px; border-radius: 50%; background: conic-gradient(#00f7ff {percentage}%, #2c5364 {percentage}% 100%); animation: fillAnimation 2s ease-out;'></div>
61
- <div style='position: absolute; color: white; font-weight: bold; font-size: 1.5em;'>{percentage}%</div>
62
- </div>
63
-
64
  <style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  @keyframes fillAnimation {{
66
- 0% {{ background: conic-gradient(#00f7ff 0%, #2c5364 0% 100%); }}
67
- 100% {{ background: conic-gradient(#00f7ff {percentage}%, #2c5364 {percentage}% 100%); }}
 
 
 
 
68
  }}
69
  </style>
 
 
 
 
70
  """
71
  return html_code
72
 
73
 
 
 
74
  def generate_skill_gap_report(user_skills, job_skills, missing_skills, match_percent):
75
  llm = ChatGroq(model="llama3-8b-8192", temperature=0.2)
76
  template = """
@@ -145,43 +180,126 @@ def process_skill_gap(resume_pdf, jd_pdfs):
145
 
146
  with gr.Blocks() as demo:
147
  gr.HTML("""
148
- <style>
149
- body {
150
- background: linear-gradient(135deg, #0d1b2a, #1b263b, #415a77);
151
- background-size: 300% 300%;
152
- animation: gradientShift 15s ease infinite;
153
- overflow-x: hidden;
154
- position: relative;
155
- }
156
- @keyframes gradientShift {
157
- 0% {background-position: 0% 50%;}
158
- 50% {background-position: 100% 50%;}
159
- 100% {background-position: 0% 50%;}
160
- }
161
- .floating-circle {
162
- position: fixed;
163
- border-radius: 50%;
164
- background: rgba(0,255,255,0.08);
165
- box-shadow: 0 0 20px rgba(0,255,255,0.2);
166
- animation: floatUp linear infinite;
167
- z-index: -1;
168
- filter: blur(2px);
169
- }
170
- @keyframes floatUp {
171
- 0% {transform: translateY(100vh); opacity: 0;}
172
- 10% {opacity: 0.2;}
173
- 90% {opacity: 0.2;}
174
- 100% {transform: translateY(-200px); opacity: 0;}
175
- }
176
- .floating-circle:nth-child(1){width:80px;height:80px;left:20%;animation-duration:25s;}
177
- .floating-circle:nth-child(2){width:100px;height:100px;left:50%;animation-duration:30s;animation-delay:5s;}
178
- .floating-circle:nth-child(3){width:60px;height:60px;left:70%;animation-duration:20s;animation-delay:10s;}
179
- .floating-circle:nth-child(4){width:90px;height:90px;left:35%;animation-duration:35s;animation-delay:15s;}
180
- .floating-circle:nth-child(5){width:120px;height:120px;left:80%;animation-duration:40s;animation-delay:20s;}
181
- h1,h2,h3,p,label{color:#00f7ff!important;text-shadow:0 0 8px rgba(0,255,255,0.3);}
182
- </style>
183
- <div class='floating-circle'></div><div class='floating-circle'></div><div class='floating-circle'></div><div class='floating-circle'></div><div class='floating-circle'></div>
184
- """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
 
186
  gr.Markdown("# 🧠 TALENTPATCH - Multi-JD AI Skill Gap Checker")
187
 
 
56
 
57
  def generate_circular_progress(percentage):
58
  html_code = f"""
 
 
 
 
 
59
  <style>
60
+ .circular-progress {{
61
+ position: relative;
62
+ width: 160px;
63
+ height: 160px;
64
+ border-radius: 50%;
65
+ background: conic-gradient(#00c6ff 0%, #003366 0%);
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ box-shadow: 0 0 20px rgba(0, 198, 255, 0.5);
70
+ animation: fillAnimation 2s ease-out forwards;
71
+ }}
72
+
73
+ .circular-progress::after {{
74
+ content: "";
75
+ position: absolute;
76
+ width: 120px;
77
+ height: 120px;
78
+ background: #1b263b;
79
+ border-radius: 50%;
80
+ }}
81
+
82
+ .circular-progress span {{
83
+ position: absolute;
84
+ color: #00f7ff;
85
+ font-size: 1.8em;
86
+ font-weight: bold;
87
+ text-shadow: 0 0 5px rgba(0,255,255,0.8);
88
+ }}
89
+
90
  @keyframes fillAnimation {{
91
+ from {{
92
+ background: conic-gradient(#00c6ff 0%, #003366 0%);
93
+ }}
94
+ to {{
95
+ background: conic-gradient(#00c6ff {percentage}%, #003366 {percentage}% 100%);
96
+ }}
97
  }}
98
  </style>
99
+
100
+ <div class='circular-progress' style='--progress: {percentage};'>
101
+ <span>{percentage}%</span>
102
+ </div>
103
  """
104
  return html_code
105
 
106
 
107
+
108
+
109
  def generate_skill_gap_report(user_skills, job_skills, missing_skills, match_percent):
110
  llm = ChatGroq(model="llama3-8b-8192", temperature=0.2)
111
  template = """
 
180
 
181
  with gr.Blocks() as demo:
182
  gr.HTML("""
183
+ <style>
184
+ body {
185
+ background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
186
+ background-size: 300% 300%;
187
+ animation: gradientShift 15s ease infinite;
188
+ font-family: 'Segoe UI', 'Roboto', sans-serif;
189
+ color: #ffffff;
190
+ margin: 0;
191
+ padding: 0;
192
+ }
193
+
194
+ @keyframes gradientShift {
195
+ 0% {background-position: 0% 50%;}
196
+ 50% {background-position: 100% 50%;}
197
+ 100% {background-position: 0% 50%;}
198
+ }
199
+
200
+ .floating-circle {
201
+ position: fixed;
202
+ border-radius: 50%;
203
+ background: rgba(0,255,255,0.07);
204
+ box-shadow: 0 0 30px rgba(0,255,255,0.2);
205
+ animation: floatUp linear infinite;
206
+ z-index: -1;
207
+ filter: blur(2px);
208
+ }
209
+
210
+ @keyframes floatUp {
211
+ 0% {transform: translateY(100vh); opacity: 0;}
212
+ 10% {opacity: 0.2;}
213
+ 90% {opacity: 0.2;}
214
+ 100% {transform: translateY(-200px); opacity: 0;}
215
+ }
216
+
217
+ .floating-circle:nth-child(1) { width: 80px; height: 80px; left: 15%; animation-duration: 25s; }
218
+ .floating-circle:nth-child(2) { width: 100px; height: 100px; left: 50%; animation-duration: 30s; animation-delay: 5s; }
219
+ .floating-circle:nth-child(3) { width: 60px; height: 60px; left: 70%; animation-duration: 20s; animation-delay: 10s; }
220
+ .floating-circle:nth-child(4) { width: 90px; height: 90px; left: 35%; animation-duration: 35s; animation-delay: 15s; }
221
+ .floating-circle:nth-child(5) { width: 120px; height: 120px; left: 80%; animation-duration: 40s; animation-delay: 20s; }
222
+
223
+ input, textarea, .gr-textbox, .gr-slider, .gr-button, .gr-file, .gr-markdown, .gr-image {
224
+ background: rgba(255, 255, 255, 0.05) !important;
225
+ color: #ffffff !important;
226
+ border-radius: 10px !important;
227
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
228
+ backdrop-filter: blur(8px);
229
+ padding: 10px !important;
230
+ box-shadow: 0 4px 10px rgba(0,0,0,0.3);
231
+ transition: all 0.3s ease;
232
+ }
233
+
234
+ .gr-button {
235
+ background: linear-gradient(135deg, #00c6ff, #0072ff) !important;
236
+ color: #ffffff !important;
237
+ font-weight: bold;
238
+ text-transform: uppercase;
239
+ cursor: pointer;
240
+ border: none !important;
241
+ box-shadow: 0 4px 15px rgba(0, 198, 255, 0.4);
242
+ }
243
+
244
+ .gr-button:hover {
245
+ background: linear-gradient(135deg, #0072ff, #00c6ff) !important;
246
+ box-shadow: 0 6px 20px rgba(0, 198, 255, 0.6);
247
+ transform: translateY(-2px);
248
+ }
249
+
250
+ textarea, .gr-textbox {
251
+ min-height: 120px !important;
252
+ line-height: 1.6;
253
+ }
254
+
255
+ h1, h2, h3, p, label {
256
+ color: #00f7ff !important;
257
+ text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
258
+ }
259
+
260
+ .circular-progress {
261
+ position: relative;
262
+ width: 160px;
263
+ height: 160px;
264
+ border-radius: 50%;
265
+ background: conic-gradient(#00c6ff 0%, #003366 0%);
266
+ display: flex;
267
+ align-items: center;
268
+ justify-content: center;
269
+ box-shadow: 0 0 20px rgba(0, 198, 255, 0.5);
270
+ animation: fillAnimation 2s ease-out forwards;
271
+ }
272
+
273
+ .circular-progress::after {
274
+ content: "";
275
+ position: absolute;
276
+ width: 120px;
277
+ height: 120px;
278
+ background: #1b263b;
279
+ border-radius: 50%;
280
+ }
281
+
282
+ .circular-progress span {
283
+ position: absolute;
284
+ color: #00f7ff;
285
+ font-size: 1.8em;
286
+ font-weight: bold;
287
+ text-shadow: 0 0 5px rgba(0,255,255,0.8);
288
+ }
289
+
290
+ @keyframes fillAnimation {
291
+ from { background: conic-gradient(#00c6ff 0%, #003366 0%); }
292
+ to { background: conic-gradient(#00c6ff var(--progress)%, #003366 var(--progress)% 100%); }
293
+ }
294
+ </style>
295
+
296
+ <div class='floating-circle'></div>
297
+ <div class='floating-circle'></div>
298
+ <div class='floating-circle'></div>
299
+ <div class='floating-circle'></div>
300
+ <div class='floating-circle'></div>
301
+ """)
302
+
303
 
304
  gr.Markdown("# 🧠 TALENTPATCH - Multi-JD AI Skill Gap Checker")
305