Smart_CV / app.py
Danial7's picture
Upload 7 files
a5203b8 verified
import streamlit as st
from utils import parse_resume, get_recommendations, load_models
from job_api import get_jobs
from visa_suggester import suggest_visas
from roadmap import generate_roadmap
from cert_suggester import suggest_certifications, suggest_degrees
import base64
st.set_page_config(page_title="Universal Smart CV Analyzer", layout="wide")
st.title("🌍 Universal Smart CV Analyzer & Career Roadmap Generator")
st.markdown("Upload your CV to get skill scores, job suggestions, visa paths, certifications, and a personalized roadmap.")
uploaded_file = st.file_uploader("Upload your CV (PDF or DOCX)", type=["pdf", "docx"])
if uploaded_file:
with st.spinner("Analyzing your CV..."):
resume_text = parse_resume(uploaded_file)
nlp_model, llm_model = load_models()
skill_score, domain, extracted_skills, education = get_recommendations(resume_text, nlp_model, llm_model)
st.subheader("🧠 CV Analysis Results")
st.write(f"**Detected Domain:** {domain}")
st.write(f"**Skill Score:** {skill_score} / 100")
st.write("**Extracted Skills:**", ", ".join(extracted_skills))
st.write("**Education/Qualification Detected:**", education)
st.subheader("πŸ“ˆ Career Roadmap")
roadmap_html = generate_roadmap(domain, extracted_skills, llm_model)
st.components.v1.html(roadmap_html, height=400, scrolling=True)
st.subheader("πŸŽ“ Certification & Higher Education Suggestions")
certs = suggest_certifications(domain, extracted_skills)
degrees = suggest_degrees(domain, education)
st.write("**Recommended Certifications:**")
st.write(certs)
st.write("**Recommended Higher Education Options:**")
st.write(degrees)
st.subheader("πŸ›« Visa & Country Guidance")
visa_info = suggest_visas(domain, extracted_skills)
st.write(visa_info)
st.subheader("πŸ’Ό Job Listings (Powered by Adzuna)")
job_listings = get_jobs(domain)
for job in job_listings:
st.markdown(f"**{job['title']}** - {job['location']}")
st.markdown(f"[Apply Here]({job['url']})")
st.markdown("---")