File size: 764 Bytes
d20782d
 
 
 
 
 
 
 
 
 
 
 
 
c941122
d20782d
 
3cde153
d20782d
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import google.generativeai as genai 
import os
from dotenv import load_dotenv
from convert import ExtractPDFText
load_dotenv()

genai.configure(api_key = os.environ["GOOGLE_API_KEY"])

model = genai.GenerativeModel("gemini-pro") 

def modelFeedback(ats_score,resume_data):

    input_prompt = f"""
        You are now an ATS Score analyzer and given ATS Score is {int(ats_score*100)}%. 
        Your task is to provide feedback to the user based on the ATS score.
        print ATS score first. mention where resume is good and where resume lacks. 
        talk about each section of user's resume and talk good and bad points of it. 
    """
    response = model.generate_content([input_prompt,resume_data],stream=True)
    response.resolve()

    return response