├── README.md ├── app.py ├── recruitment-helper.parquet └── requirements.txt /README.md: -------------------------------------------------------------------------------- 1 | ##how to install dependencies 2 | 1. create new project with python 3.10 or above 3 | 2. create new files "app.py" and "requirements.txt" 4 | 3. copy paste the code and the dependencies in both files respectively 5 | 4. install dependencies by running the following code in the terminal "pip install -r requirements.txt" 6 | 5. wait and let the skeletons update 7 | 6. onces done run streamlit "streamlit run app.py" 8 | -------- onces you have got to this point, rest we will continue in the workshop 9 | 7. replace the api key and project key with your own 10 | 8. import the project into your action table 11 | 12 | 13 | 14 | ## Recruitment Helper - Your AI Assistant for Job Matching 15 | 16 | This is a simple web app designed to help match job seekers with job descriptions, using AI to analyze CVs and extract useful insights. The app is built using Streamlit, making it easy to use with a friendly user interface. 17 | 18 | ### How It Works 19 | 20 | - **Upload Your CV**: You start by uploading a PDF version of your CV. 21 | - **Enter Job Description**: Then, you provide a job description for the role you are interested in. 22 | - **AI Processing**: Once you hit the "Process Input" button, the AI analyzes your CV alongside the job description and provides a summary, rating, work experience details, and a skills match analysis. 23 | - **Download Report**: You can also download a detailed report with all the findings in a convenient Word document format. 24 | 25 | ### Features 26 | 27 | - **CV Analysis**: Extracts and processes the text from your uploaded CV. 28 | - **Job Match Insights**: Compares your skills and experience to the job description and highlights matching skills, skills that don't match, and an overall rating. 29 | - **Downloadable Report**: Generates a final report that you can download for your own records or to share with potential employers. 30 | 31 | ### Technology Stack 32 | 33 | - **Streamlit**: For the web interface. 34 | - **PyPDF2**: To extract text from PDF files. 35 | - **JamAI API**: To analyze and generate job matching insights. 36 | - **Python-docx**: To create a downloadable report. 37 | 38 | This tool is ideal for anyone looking to quickly understand how well their skills match a particular job and to get AI-powered insights into improving their job application materials. 39 | 40 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | import streamlit as st 2 | from jamaibase import JamAI, protocol as p 3 | import os 4 | from docx import Document 5 | from io import BytesIO 6 | import random 7 | import string 8 | from PyPDF2 import PdfReader 9 | 10 | 11 | jamai = JamAI(api_key="YOUR API KEY HERE", project_id="YOUR PROJECT ID KEY HERE") 12 | 13 | 14 | # Function to extract text from PDF 15 | def extract_text_from_pdf(pdf_file): 16 | pdf = PdfReader(pdf_file) 17 | text = "" 18 | for page in pdf.pages: 19 | page_text = page.extract_text() 20 | if page_text: 21 | text += page_text + "\n" 22 | return text 23 | 24 | 25 | # Function to generate a random filename 26 | def generate_random_filename(extension=".docx"): 27 | random_str = ''.join(random.choices(string.ascii_letters + string.digits, k=10)) 28 | return f"final_report_{random_str}{extension}" 29 | 30 | 31 | # Set up the Streamlit app 32 | st.set_page_config(page_title="Recruitment Helper", page_icon="📝") 33 | st.title("🌟 Recruitment Helper - Your AI Assistant for Job Matching") 34 | 35 | # Custom CSS to style the UI 36 | st.markdown( 37 | """ 38 | 66 | """, 67 | unsafe_allow_html=True 68 | ) 69 | 70 | # Containers for inputs 71 | with st.container(): 72 | st.header("📄 Upload CV and Provide Job Description") 73 | # Upload PDF CV 74 | cv_pdf = st.file_uploader("Upload CV (PDF format)", type="pdf") 75 | # Job Description input 76 | job_description = st.text_area("✍️ Enter Job Description") 77 | 78 | # Action to process inputs 79 | if st.button("🚀 Process Input", use_container_width=True): 80 | if cv_pdf and job_description: 81 | # Extract text from CV PDF 82 | cv_text = extract_text_from_pdf(cv_pdf) 83 | 84 | # Add rows to the existing table with the input data 85 | try: 86 | completion = jamai.add_table_rows( 87 | "action", 88 | p.RowAddRequest( 89 | table_id="recruitment-helper", 90 | data=[{"cv": cv_text, "job_description": job_description}], 91 | stream=False 92 | ) 93 | ) 94 | 95 | # Display the output generated in the columns 96 | if completion.rows: 97 | output_row = completion.rows[0].columns 98 | summary = output_row.get("summary") 99 | work_experience = output_row.get("work_experience") 100 | rating = output_row.get("rating") 101 | matching_skills = output_row.get("matching_skills") 102 | skills_not_matching = output_row.get("skills_not_matching") 103 | final_report = output_row.get("final_report") 104 | 105 | st.subheader("✨ Generated Output") 106 | st.markdown( 107 | f""" 108 |
{summary.text if summary else 'N/A'}
110 |{work_experience.text if work_experience else 'N/A'}
111 |{rating.text if rating else 'N/A'}
112 |{matching_skills.text if matching_skills else 'N/A'}
113 |{skills_not_matching.text if skills_not_matching else 'N/A'}
114 |{final_report.text if final_report else 'N/A'}
115 |