-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
38 lines (31 loc) · 1.61 KB
/
app.py
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
# app.py
import streamlit as st
from recommender import JobRecommender
def main():
st.title("AI Job Recommender 🔍")
st.markdown("Get personalized job recommendations using BERT AI and Jooble data.")
# Your Jooble API key (replace with your actual API key)
API_KEY = "11614a68-52db-4975-ad2b-c365991de2eb"
recommender = JobRecommender(API_KEY)
# User input fields
keywords = st.text_input("Job Role", "Software Engineer")
location = st.text_input("Location", "Remote")
user_skills = st.text_area("Your Skills/Experience",
"Python, Machine Learning, Software Development")
if st.button("Get Recommendations"):
with st.spinner("Fetching jobs and computing recommendations..."):
recommender.refresh_job_data(keywords, location)
recommendations = recommender.recommend_jobs(user_skills)
if recommendations.empty:
st.warning("No job recommendations found. Please try different keywords or location.")
else:
for idx, row in recommendations.iterrows():
st.subheader(row['title'])
st.caption(f"📍 {row.get('location', 'Location not specified')}")
st.markdown(f"**Company:** {row.get('company', 'Unknown company')}")
st.markdown(f"**Description:** {row['description'][:300]}...")
if 'link' in row and pd.notna(row['link']):
st.markdown(f"[Apply Here]({row['link']})")
st.divider()
if __name__ == "__main__":
main()