File size: 839 Bytes
30b3b49
 
2600a8c
 
30b3b49
2600a8c
30b3b49
2600a8c
30b3b49
2600a8c
30b3b49
2600a8c
 
30b3b49
2600a8c
 
 
 
 
 
30b3b49
2600a8c
30b3b49
2600a8c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import streamlit as st
import requests
from database import save_resume_data
from crewai import ResumeAgents

st.title("AI-Powered Resume Screening")

uploaded_files = st.file_uploader("Upload Resumes", accept_multiple_files=True, type=["pdf", "txt"])

job_description = st.text_area("Enter Job Description")

if st.button("Process Resumes"):
    results = []
    
    for uploaded_file in uploaded_files:
        resume_text = uploaded_file.read().decode("utf-8")
        parsed_details = ResumeAgents.parse_resume(resume_text)
        ranking_score = ResumeAgents.rank_resume(parsed_details, job_description)
        
        save_resume_data(resume_text, parsed_details, ranking_score)
        
        results.append(f"Resume: {uploaded_file.name}\nRank: {ranking_score}\nDetails: {parsed_details}")

    st.write("\n\n".join(results))