File size: 1,504 Bytes
8eb3b8c
1a0529a
8eb3b8c
1a0529a
fe1ac72
1fe71ce
1a0529a
 
1fe71ce
1a0529a
 
1a04b05
6886a01
fe1ac72
 
1a04b05
f8decbd
fe1ac72
 
 
 
 
 
 
f8decbd
 
6886a01
 
77c2768
6886a01
 
1a0529a
6886a01
f8decbd
1a0529a
6886a01
 
 
1a0529a
 
 
6886a01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import streamlit as st
import google.generativeai as genai

# Header for the Streamlit app
st.header("Resume Maker")

# Retrieve the API key from Streamlit secrets
GOOGLE_API_KEY = st.secrets["GEMINI_API_KEY"]

# Configure the Google Generative AI API with your API key
genai.configure(api_key=GOOGLE_API_KEY)

# Text input for user prompt
user_input_resume = st.text_area("Enter your Resume", height = 100)
user_input_job_description = st.text_area("Enter JD", height = 100)

prompt = f"""
Imagine you are an ATS Compliante Resume Creator Use my Current Resume 
{user_input_resume} and the 
new JD to create a Resume that has keywords paraphrased as per the new 
{user_input_job_description}. 
First create a Proffesional Summary 
and then create a 6 main categories of the skills and put all the keywords under them as comma seperated format. 
Then create the Current Exprience Section with keywords from the JD. 
"""

# Button to submit the prompt
if st.button("Generate"):
    if user_input_resume:
        # Initialize the model
        model = genai.GenerativeModel('gemini-pro')  # Assuming this is the correct model
        try:
            # Generate content based on the user's input
            response = model.generate_content(prompt)
            
            # Display the generated content
            st.write("Generated Content:")
            st.write(response.text)
        except Exception as e:
            st.error(f"Error: {e}")
    else:
        st.error("Please enter a prompt.")