Spaces:
Sleeping
Sleeping
| 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.") | |