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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import groq
|
| 3 |
+
from jobspy import scrape_jobs
|
| 4 |
+
import pandas as pd
|
| 5 |
+
import json
|
| 6 |
+
from typing import List, Dict
|
| 7 |
+
import numpy as np
|
| 8 |
+
import time
|
| 9 |
+
|
| 10 |
+
def make_clickable(url: str) -> str:
|
| 11 |
+
"""
|
| 12 |
+
Convert a URL to a clickable HTML link.
|
| 13 |
+
|
| 14 |
+
Args:
|
| 15 |
+
url (str): The URL to make clickable
|
| 16 |
+
|
| 17 |
+
Returns:
|
| 18 |
+
str: HTML anchor tag with the URL
|
| 19 |
+
"""
|
| 20 |
+
return f'<a href="{url}" target="_blank" style="color: #4e79a7;">Link</a>'
|
| 21 |
+
|
| 22 |
+
def convert_prompt_to_parameters(client, prompt: str) -> Dict[str, str]:
|
| 23 |
+
"""
|
| 24 |
+
Convert user input prompt to structured job search parameters using AI.
|
| 25 |
+
|
| 26 |
+
Args:
|
| 27 |
+
client: Groq AI client
|
| 28 |
+
prompt (str): User's job search description
|
| 29 |
+
|
| 30 |
+
Returns:
|
| 31 |
+
Dict[str, str]: Extracted search parameters with search_term and location
|
| 32 |
+
"""
|
| 33 |
+
system_prompt = """
|
| 34 |
+
You are a language decoder. Extract:
|
| 35 |
+
- search_term: job role/keywords (expand abbreviations)
|
| 36 |
+
- location: mentioned place or 'USA'
|
| 37 |
+
Return only: {"search_term": "term", "location": "location"}
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
response = client.chat.completions.create(
|
| 41 |
+
messages=[
|
| 42 |
+
{"role": "system", "content": system_prompt},
|
| 43 |
+
{"role": "user", "content": f"Extract from: {prompt}"}
|
| 44 |
+
],
|
| 45 |
+
max_tokens=1024,
|
| 46 |
+
model='llama3-70b-8192',
|
| 47 |
+
temperature=0.2
|
| 48 |
+
)
|
| 49 |
+
|
| 50 |
+
try:
|
| 51 |
+
return json.loads(response.choices[0].message.content)
|
| 52 |
+
except json.JSONDecodeError:
|
| 53 |
+
return {"search_term": prompt, "location": "USA"}
|
| 54 |
+
|
| 55 |
+
def analyze_resume(client, resume: str) -> str:
|
| 56 |
+
"""
|
| 57 |
+
Generate a comprehensive resume analysis using AI.
|
| 58 |
+
|
| 59 |
+
Args:
|
| 60 |
+
client: Groq AI client
|
| 61 |
+
resume (str): Full resume text
|
| 62 |
+
|
| 63 |
+
Returns:
|
| 64 |
+
str: Concise professional overview of the resume
|
| 65 |
+
"""
|
| 66 |
+
system_prompt = """Analyze resume comprehensively in 150 words:
|
| 67 |
+
1. Professional Profile Summary
|
| 68 |
+
2. Key Technical Skills
|
| 69 |
+
3. Educational Background
|
| 70 |
+
4. Core Professional Experience Highlights
|
| 71 |
+
5. Unique Strengths/Achievements
|
| 72 |
+
Return a concise, structured professional overview."""
|
| 73 |
+
|
| 74 |
+
response = client.chat.completions.create(
|
| 75 |
+
messages=[
|
| 76 |
+
{"role": "system", "content": system_prompt},
|
| 77 |
+
{"role": "user", "content": resume}
|
| 78 |
+
],
|
| 79 |
+
max_tokens=400,
|
| 80 |
+
model='llama3-70b-8192',
|
| 81 |
+
temperature=0.3
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
+
return response.choices[0].message.content
|
| 85 |
+
|
| 86 |
+
@st.cache_data(ttl=3600)
|
| 87 |
+
def get_job_data(search_params: Dict[str, str]) -> pd.DataFrame:
|
| 88 |
+
"""
|
| 89 |
+
Fetch job listings from multiple sources based on search parameters.
|
| 90 |
+
|
| 91 |
+
Args:
|
| 92 |
+
search_params (Dict[str, str]): Search parameters including term and location
|
| 93 |
+
|
| 94 |
+
Returns:
|
| 95 |
+
pd.DataFrame: Scraped job listings
|
| 96 |
+
"""
|
| 97 |
+
try:
|
| 98 |
+
return scrape_jobs(
|
| 99 |
+
site_name=["indeed", "linkedin", "zip_recruiter"],
|
| 100 |
+
search_term=search_params["search_term"],
|
| 101 |
+
location=search_params["location"],
|
| 102 |
+
results_wanted=60,
|
| 103 |
+
hours_old=24,
|
| 104 |
+
country_indeed='USA'
|
| 105 |
+
)
|
| 106 |
+
except Exception as e:
|
| 107 |
+
st.warning(f"Error in job scraping: {str(e)}")
|
| 108 |
+
return pd.DataFrame()
|
| 109 |
+
|
| 110 |
+
def analyze_job_batch(
|
| 111 |
+
client,
|
| 112 |
+
resume: str,
|
| 113 |
+
jobs_batch: List[Dict],
|
| 114 |
+
start_index: int,
|
| 115 |
+
retry_count: int = 0
|
| 116 |
+
) -> pd.DataFrame:
|
| 117 |
+
"""
|
| 118 |
+
Analyze a batch of jobs against the resume with retry logic.
|
| 119 |
+
|
| 120 |
+
Args:
|
| 121 |
+
client: Groq AI client
|
| 122 |
+
resume (str): Resume text
|
| 123 |
+
jobs_batch (List[Dict]): Batch of job listings
|
| 124 |
+
start_index (int): Starting index of the batch
|
| 125 |
+
retry_count (int, optional): Number of retry attempts. Defaults to 0.
|
| 126 |
+
|
| 127 |
+
Returns:
|
| 128 |
+
pd.DataFrame: Job match analysis results
|
| 129 |
+
"""
|
| 130 |
+
if retry_count >= 3:
|
| 131 |
+
return pd.DataFrame()
|
| 132 |
+
|
| 133 |
+
system_prompt = """Rate resume-job matches. Return only JSON array:
|
| 134 |
+
[{"job_index": number, "match_score": 0-100, "reason": "brief reason"}]"""
|
| 135 |
+
|
| 136 |
+
jobs_info = [
|
| 137 |
+
{
|
| 138 |
+
'index': idx + start_index,
|
| 139 |
+
'title': job['title'],
|
| 140 |
+
'desc': job.get('description', '')[:400],
|
| 141 |
+
}
|
| 142 |
+
for idx, job in enumerate(jobs_batch)
|
| 143 |
+
]
|
| 144 |
+
|
| 145 |
+
resume_summary = analyze_resume(client, resume)
|
| 146 |
+
|
| 147 |
+
analysis_prompt = f"Resume: {resume_summary}\nJobs: {json.dumps(jobs_info)}"
|
| 148 |
+
|
| 149 |
+
try:
|
| 150 |
+
response = client.chat.completions.create(
|
| 151 |
+
messages=[
|
| 152 |
+
{"role": "system", "content": system_prompt},
|
| 153 |
+
{"role": "user", "content": analysis_prompt}
|
| 154 |
+
],
|
| 155 |
+
max_tokens=1024,
|
| 156 |
+
model='llama3-70b-8192',
|
| 157 |
+
temperature=0.3
|
| 158 |
+
)
|
| 159 |
+
|
| 160 |
+
matches = json.loads(response.choices[0].message.content)
|
| 161 |
+
return pd.DataFrame(matches)
|
| 162 |
+
except Exception as e:
|
| 163 |
+
if retry_count < 3:
|
| 164 |
+
time.sleep(2)
|
| 165 |
+
return analyze_job_batch(client, resume, jobs_batch, start_index, retry_count + 1)
|
| 166 |
+
st.warning(f"Batch {start_index} failed after retries: {str(e)}")
|
| 167 |
+
return pd.DataFrame()
|
| 168 |
+
|
| 169 |
+
def analyze_jobs_in_batches(
|
| 170 |
+
client,
|
| 171 |
+
resume: str,
|
| 172 |
+
jobs_df: pd.DataFrame,
|
| 173 |
+
batch_size: int = 3
|
| 174 |
+
) -> pd.DataFrame:
|
| 175 |
+
"""
|
| 176 |
+
Process job listings in batches and analyze match with resume.
|
| 177 |
+
|
| 178 |
+
Args:
|
| 179 |
+
client: Groq AI client
|
| 180 |
+
resume (str): Resume text
|
| 181 |
+
jobs_df (pd.DataFrame): DataFrame of job listings
|
| 182 |
+
batch_size (int, optional): Number of jobs to process in each batch. Defaults to 3.
|
| 183 |
+
|
| 184 |
+
Returns:
|
| 185 |
+
pd.DataFrame: Sorted job matches by match score
|
| 186 |
+
"""
|
| 187 |
+
all_matches = []
|
| 188 |
+
jobs_dict = jobs_df.to_dict('records')
|
| 189 |
+
progress_bar = st.progress(0)
|
| 190 |
+
status_text = st.empty()
|
| 191 |
+
|
| 192 |
+
for i in range(0, len(jobs_dict), batch_size):
|
| 193 |
+
batch = jobs_dict[i:i + batch_size]
|
| 194 |
+
status_text.text(f"Processing batch {i//batch_size + 1} of {len(jobs_dict)//batch_size + 1}")
|
| 195 |
+
|
| 196 |
+
batch_matches = analyze_job_batch(client, resume, batch, i)
|
| 197 |
+
if not batch_matches.empty:
|
| 198 |
+
all_matches.append(batch_matches)
|
| 199 |
+
|
| 200 |
+
progress = min((i + batch_size) / len(jobs_dict), 1.0)
|
| 201 |
+
progress_bar.progress(progress)
|
| 202 |
+
time.sleep(1) # Rate limiting
|
| 203 |
+
|
| 204 |
+
progress_bar.empty()
|
| 205 |
+
status_text.empty()
|
| 206 |
+
|
| 207 |
+
if all_matches:
|
| 208 |
+
final_matches = pd.concat(all_matches, ignore_index=True)
|
| 209 |
+
return final_matches.sort_values('match_score', ascending=False)
|
| 210 |
+
return pd.DataFrame()
|
| 211 |
+
|
| 212 |
+
def main():
|
| 213 |
+
"""
|
| 214 |
+
Main Streamlit application entry point for Smart Job Search.
|
| 215 |
+
Handles user interface, job search, and AI-powered job matching.
|
| 216 |
+
"""
|
| 217 |
+
st.set_page_config(
|
| 218 |
+
layout="wide",
|
| 219 |
+
page_title="Smart Job Search with AI Matching",
|
| 220 |
+
initial_sidebar_state="collapsed"
|
| 221 |
+
)
|
| 222 |
+
|
| 223 |
+
# Custom CSS with reduced text sizes
|
| 224 |
+
st.markdown("""
|
| 225 |
+
<style>
|
| 226 |
+
.block-container {
|
| 227 |
+
padding-top: 1.5rem;
|
| 228 |
+
padding-bottom: 1.5rem;
|
| 229 |
+
max-width: 1200px;
|
| 230 |
+
}
|
| 231 |
+
.stButton>button {
|
| 232 |
+
background-color: #2563eb;
|
| 233 |
+
color: white;
|
| 234 |
+
border-radius: 0.375rem;
|
| 235 |
+
padding: 0.75rem 1.5rem;
|
| 236 |
+
border: none;
|
| 237 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
| 238 |
+
margin: 0.5rem;
|
| 239 |
+
min-width: 200px;
|
| 240 |
+
font-size: 0.875rem;
|
| 241 |
+
}
|
| 242 |
+
[data-testid="stFileUploader"] {
|
| 243 |
+
border: 2px dashed #e5e7eb;
|
| 244 |
+
border-radius: 0.5rem;
|
| 245 |
+
padding: 0.875rem;
|
| 246 |
+
min-height: 220px;
|
| 247 |
+
font-size: 0.875rem;
|
| 248 |
+
}
|
| 249 |
+
.stTextArea>div>div {
|
| 250 |
+
border-radius: 0.5rem;
|
| 251 |
+
min-height: 220px !important;
|
| 252 |
+
font-size: 0.875rem;
|
| 253 |
+
}
|
| 254 |
+
.stTextInput>div>div>input {
|
| 255 |
+
border-radius: 0.5rem;
|
| 256 |
+
font-size: 0.875rem;
|
| 257 |
+
}
|
| 258 |
+
.resume-html {
|
| 259 |
+
padding: 1.5rem;
|
| 260 |
+
max-width: 800px;
|
| 261 |
+
margin: 0 auto;
|
| 262 |
+
background: white;
|
| 263 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 264 |
+
border-radius: 0.5rem;
|
| 265 |
+
font-size: 0.875rem;
|
| 266 |
+
}
|
| 267 |
+
h1 {font-size: 3rem !important; /* Adjust this value to increase the font size */
|
| 268 |
+
} h2 {font-size: 1.5rem !important; /* Adjust this value to increase the font size */
|
| 269 |
+
h3, h4, h5, h6 {
|
| 270 |
+
font-size: 80% !important;
|
| 271 |
+
}
|
| 272 |
+
p, li {
|
| 273 |
+
font-size: 0.875rem !important;
|
| 274 |
+
}
|
| 275 |
+
</style>
|
| 276 |
+
""", unsafe_allow_html=True)
|
| 277 |
+
|
| 278 |
+
# Header with smaller text
|
| 279 |
+
st.markdown("""
|
| 280 |
+
<h1 style='text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 0.875rem;'>
|
| 281 |
+
π Smart Job Search with AI Matching
|
| 282 |
+
</h1>
|
| 283 |
+
""", unsafe_allow_html=True)
|
| 284 |
+
|
| 285 |
+
col1, col2 = st.columns(2)
|
| 286 |
+
|
| 287 |
+
with col1:
|
| 288 |
+
user_input = st.text_area(
|
| 289 |
+
"Describe the job you're looking for",
|
| 290 |
+
placeholder="E.g., 'Senior Python developer with React experience in San Francisco'",
|
| 291 |
+
height=150
|
| 292 |
+
)
|
| 293 |
+
|
| 294 |
+
with col2:
|
| 295 |
+
user_resume = st.text_area(
|
| 296 |
+
"Paste your resume here (for AI-powered matching)",
|
| 297 |
+
placeholder="Paste your resume for AI-powered job matching",
|
| 298 |
+
height=150
|
| 299 |
+
)
|
| 300 |
+
|
| 301 |
+
api_key = st.text_input(
|
| 302 |
+
"Enter your Groq API key",
|
| 303 |
+
type="password",
|
| 304 |
+
help="Your API key will be used to process the job search query"
|
| 305 |
+
)
|
| 306 |
+
|
| 307 |
+
# Add this CSS styling right after st.set_page_config()
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
if st.button("π Search Jobs", disabled=not api_key):
|
| 311 |
+
st.markdown("""
|
| 312 |
+
<style>
|
| 313 |
+
.stTabs [data-baseweb="tab-list"] {
|
| 314 |
+
display: flex;
|
| 315 |
+
justify-content: space-between;
|
| 316 |
+
width: 100%;
|
| 317 |
+
}
|
| 318 |
+
.stTabs [data-baseweb="tab"] {
|
| 319 |
+
flex: 1;
|
| 320 |
+
text-align: center;
|
| 321 |
+
}
|
| 322 |
+
</style>
|
| 323 |
+
""", unsafe_allow_html=True)
|
| 324 |
+
|
| 325 |
+
# Modify tab creation to use descriptive names
|
| 326 |
+
tab1, tab2, tab3 = st.tabs([
|
| 327 |
+
"π Job Listings",
|
| 328 |
+
"π Resume Summary",
|
| 329 |
+
"π€ AI Job Matching"
|
| 330 |
+
])
|
| 331 |
+
if user_input and api_key:
|
| 332 |
+
try:
|
| 333 |
+
client = groq.Client(api_key=api_key)
|
| 334 |
+
|
| 335 |
+
with st.spinner("Processing search parameters..."):
|
| 336 |
+
processed_params = convert_prompt_to_parameters(client, user_input)
|
| 337 |
+
|
| 338 |
+
with st.spinner("Searching for jobs..."):
|
| 339 |
+
jobs_data = get_job_data(processed_params)
|
| 340 |
+
|
| 341 |
+
if not jobs_data.empty:
|
| 342 |
+
data = pd.DataFrame(jobs_data)
|
| 343 |
+
data = data[data['description'].notna()].reset_index(drop=True)
|
| 344 |
+
|
| 345 |
+
with tab1:
|
| 346 |
+
st.success(f"Found {len(data)} jobs!")
|
| 347 |
+
display_df = data[['site', 'job_url', 'title', 'company', 'location', 'job_type', 'date_posted']]
|
| 348 |
+
display_df['job_url'] = display_df['job_url'].apply(make_clickable)
|
| 349 |
+
st.write(display_df.to_html(escape=False), unsafe_allow_html=True)
|
| 350 |
+
|
| 351 |
+
if user_resume:
|
| 352 |
+
with tab2:
|
| 353 |
+
st.info("Analyzing resume summary...")
|
| 354 |
+
resume_summary = analyze_resume(client, user_resume)
|
| 355 |
+
st.success("Resume summary:")
|
| 356 |
+
st.write(resume_summary)
|
| 357 |
+
|
| 358 |
+
with tab3:
|
| 359 |
+
st.info("Analyzing job matches in small batches...")
|
| 360 |
+
matches_df = analyze_jobs_in_batches(client, resume_summary, data, batch_size=3)
|
| 361 |
+
|
| 362 |
+
if not matches_df.empty:
|
| 363 |
+
matched_jobs = data.iloc[matches_df['job_index']].copy()
|
| 364 |
+
matched_jobs['match_score'] = matches_df['match_score']
|
| 365 |
+
matched_jobs['match_reason'] = matches_df['reason']
|
| 366 |
+
|
| 367 |
+
st.success(f"Found {len(matched_jobs)} recommended matches!")
|
| 368 |
+
display_cols = ['site', 'job_url', 'title', 'company', 'location', 'match_score', 'match_reason']
|
| 369 |
+
display_df = matched_jobs[display_cols].sort_values('match_score', ascending=False)
|
| 370 |
+
display_df['job_url'] = display_df['job_url'].apply(make_clickable)
|
| 371 |
+
st.write(display_df.to_html(escape=False), unsafe_allow_html=True)
|
| 372 |
+
else:
|
| 373 |
+
st.warning("Could not process job matches. Please try again.")
|
| 374 |
+
else:
|
| 375 |
+
st.warning("No jobs found with the given parameters.")
|
| 376 |
+
|
| 377 |
+
except Exception as e:
|
| 378 |
+
st.error(f"Error: {str(e)}")
|
| 379 |
+
elif not api_key:
|
| 380 |
+
st.warning("Please enter your API key.")
|
| 381 |
+
else:
|
| 382 |
+
st.warning("Please enter a job description.")
|
| 383 |
+
|
| 384 |
+
if __name__ == "__main__":
|
| 385 |
+
main()
|