SpanDone commited on
Commit
ef21a5c
·
1 Parent(s): fdf1b24

Fixed Some Issues

Browse files
Required Data/Black Book Structure.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bac1673be9ed405ffb500ba8d90664334d21b825f5b399dafcfaa6446de9b311
3
+ size 33371
Required Data/BlackBook.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51d9191b7054ee6945e357266810405db9d4d09a7a386a7383dd4c07be3380e7
3
+ size 2835268
Required Data/College-Logo-2023-pink (1).png ADDED

Git LFS Details

  • SHA256: d41127fe2a4c34075356dd8e2bc54163c5f8f306869e6bdfec1a252a080dd1aa
  • Pointer size: 131 Bytes
  • Size of remote file: 601 kB
Required Data/Travis CV.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f723cfd05803758a87c28bd10291da51c8625f9ccacca270864c7af9487718c0
3
+ size 108300
Required Data/report_1757923199.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1adce9b011e84f1edca61c574b563d53bf774daec6765084a4f8e66dc03ace88
3
+ size 2169
app.py CHANGED
@@ -1,13 +1,8 @@
1
- # --- Set Cache Folders for Hugging Face Environment ---
2
- # THIS IS THE CRUCIAL FIX. These lines MUST be at the very top, before any imports.
3
- import os
4
- os.environ["TRANSFORMERS_CACHE"] = "/tmp/transformers"
5
- os.environ["HF_HOME"] = "/tmp/huggingface"
6
-
7
  import json
8
  import re
9
  import logging
10
  import math
 
11
  import docx
12
  import fitz # PyMuPDF
13
  from dotenv import load_dotenv
@@ -17,6 +12,10 @@ from sentence_transformers import SentenceTransformer, util
17
  from rapidfuzz import fuzz, process
18
  from urllib.parse import quote_plus
19
 
 
 
 
 
20
  # --- Load environment variables and configure Gemini API ---
21
  load_dotenv()
22
  GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
@@ -167,9 +166,28 @@ def get_recommendations(answers, courses):
167
  top_courses = scored_courses[:3]
168
  raw_recs = [course for _, course in top_courses]
169
  if not raw_recs: return "🤔 I couldn’t find a strong match. Would you like to try again?", []
 
 
170
  response_html = "<div class='recommendation-container'><h4>🚀 Here are my top recommendations for you:</h4>"
171
  for i, (_, course_data) in enumerate(top_courses):
172
- response_html += f"<div class='recommendation-card clickable-card' data-action='details' data-value='{i+1}'><p><b>{i+1}. {course_data.get('course')}</b><br>{course_data.get('description', '')}</p></div>"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  response_html += f"<div class='recommendation-card clickable-card compare-card' data-action='compare' data-value='compare'><p><b>⚖️ Compare Courses</b></p></div></div>"
174
  return response_html, raw_recs
175
 
@@ -202,9 +220,7 @@ def analyze_resume_and_suggest_jobs(resume_text):
202
  2. "overall_score": An integer score out of 100 for the resume's quality.
203
  3. "summary": A brief, encouraging 1-2 sentence summary of the resume.
204
  4. "job_titles": A list of 3-5 specific job titles the candidate is well-suited for based on their skills and experience.
205
-
206
  Do not add any text before or after the JSON object.
207
-
208
  Resume Text to analyze:
209
  ---
210
  {resume_text}
 
 
 
 
 
 
 
1
  import json
2
  import re
3
  import logging
4
  import math
5
+ import os
6
  import docx
7
  import fitz # PyMuPDF
8
  from dotenv import load_dotenv
 
12
  from rapidfuzz import fuzz, process
13
  from urllib.parse import quote_plus
14
 
15
+ # --- Set Cache Folders for Hugging Face Environment ---
16
+ os.environ["TRANSFORMERS_CACHE"] = "/tmp/transformers"
17
+ os.environ["HF_HOME"] = "/tmp/huggingface"
18
+
19
  # --- Load environment variables and configure Gemini API ---
20
  load_dotenv()
21
  GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
 
166
  top_courses = scored_courses[:3]
167
  raw_recs = [course for _, course in top_courses]
168
  if not raw_recs: return "🤔 I couldn’t find a strong match. Would you like to try again?", []
169
+
170
+ # --- THIS IS THE MODIFIED PART ---
171
  response_html = "<div class='recommendation-container'><h4>🚀 Here are my top recommendations for you:</h4>"
172
  for i, (_, course_data) in enumerate(top_courses):
173
+ course_name = course_data.get('course')
174
+ description = course_data.get('description', '')
175
+ skills = course_data.get('tags', {}).get('skills', [])[:3]
176
+ careers = course_data.get('possible_careers', [])[:3]
177
+
178
+ response_html += f"<div class='recommendation-card clickable-card' data-action='details' data-value='{i+1}'>"
179
+ response_html += f"<p style='margin-bottom: 1rem;'><b>{i+1}. {course_name}</b><br>{description}</p>"
180
+
181
+ response_html += "<div style='font-size: 0.9rem; display: flex; flex-direction: column; gap: 0.5rem;'>"
182
+ if skills:
183
+ response_html += f"<div><b>🛠️ Key Skills:</b> {', '.join(s.capitalize() for s in skills)}</div>"
184
+ if careers:
185
+ response_html += f"<div><b>💼 Potential Careers:</b> {', '.join(careers)}</div>"
186
+ response_html += "</div>"
187
+
188
+ response_html += "</div>"
189
+ # ------------------------------------
190
+
191
  response_html += f"<div class='recommendation-card clickable-card compare-card' data-action='compare' data-value='compare'><p><b>⚖️ Compare Courses</b></p></div></div>"
192
  return response_html, raw_recs
193
 
 
220
  2. "overall_score": An integer score out of 100 for the resume's quality.
221
  3. "summary": A brief, encouraging 1-2 sentence summary of the resume.
222
  4. "job_titles": A list of 3-5 specific job titles the candidate is well-suited for based on their skills and experience.
 
223
  Do not add any text before or after the JSON object.
 
224
  Resume Text to analyze:
225
  ---
226
  {resume_text}