| | import streamlit as st |
| | from io import BytesIO |
| | from resume import CVParse |
| |
|
| | |
| | st.set_page_config( |
| | page_title="FitCV - AI Resume Optimizer", |
| | page_icon="π", |
| | layout="wide" |
| | ) |
| |
|
| | |
| | col1, col2 = st.columns([1, 6]) |
| |
|
| | with col1: |
| | st.image('src/assets/logo.png', width=40) |
| |
|
| | with col2: |
| | st.markdown( |
| | "<h1 style='font-size: 32px; display: inline;'>FitCV</h1><br>" |
| | "<span style='font-size:16px; color: gray;'>Your AI-Powered Resume Optimizer</span>", |
| | unsafe_allow_html=True |
| | ) |
| |
|
| | st.markdown("---") |
| |
|
| | |
| | st.header("π Optimize Your Resume for the Job You Want") |
| |
|
| | uploaded_cv = st.file_uploader("π Upload Your CV (PDF only)", type=["pdf"]) |
| |
|
| | github_username = st.text_input("π Enter Your GitHub Username") |
| | if uploaded_cv: |
| | doc = create_doc(uploaded_cv) |
| | skills = extract("SKILLS", doc) |
| |
|
| | job_mode = st.radio("What job info do you have?", ["Job Title", "Full Job Posting"]) |
| |
|
| | if job_mode == "Job Title": |
| | job_input = st.text_input("πΌ Enter the Job Title (e.g., Data Scientist at Google)") |
| | else: |
| | job_input = st.text_area("π¬ Paste the Full Job Posting") |
| |
|
| | |
| | if st.button("β¨ Optimize Resume"): |
| | if not uploaded_cv or not github_username or not job_input.strip(): |
| | st.warning("Please fill in all fields and upload a valid resume.") |
| | st.subheader("π§ Recommended Skills for This Role") |
| | st.write(", ".join(result["skills"])) |
| | else: |
| | with st.spinner("Analyzing your GitHub, resume, and job requirements..."): |
| |
|
| | |
| | from src.pipeline.recommend import refine_resume |
| |
|
| | |
| | resume_bytes = uploaded_cv.read() |
| |
|
| | result = refine_resume( |
| | resume_pdf_bytes=resume_bytes, |
| | github_username=github_username, |
| | job_input=job_input |
| | ) |
| |
|
| | |
| | st.success("β
Resume optimization complete!") |
| |
|
| | st.subheader("π Refined Professional Summary") |
| | st.write(result["summary"]) |
| |
|
| | st.subheader("π§ Recommended Skills for This Role") |
| | st.write(", ".join(result["skills"])) |
| |
|
| | st.subheader("π GitHub Projects to Highlight") |
| | for proj in result["projects"]: |
| | st.markdown(f"- **[{proj['name']}]({proj['url']})**: {proj['description']}") |
| |
|
| | st.markdown("---") |
| | st.info("These suggestions are tailored to the job you provided. You can now update your CV accordingly!") |