File size: 1,595 Bytes
8eb3b8c
1a0529a
8eb3b8c
1a0529a
fe1ac72
1fe71ce
1a0529a
 
1fe71ce
1a0529a
 
1a04b05
6886a01
fe1ac72
 
1a04b05
f8decbd
6416d81
 
 
 
 
 
 
 
 
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
44
45
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-compliant Resume Creator. Use my current resume: 
{user_input_resume} and the new job description (JD): 
{user_input_job_description} to create a tailored resume that incorporates 
keywords from the JD and paraphrases them appropriately.

Start by creating a professional summary. 
Then, list six main skill categories and organize all the relevant keywords 
under each category in a comma-separated format. 
Finally, update the 'Current Experience' section by including 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.")