careerv3 / skills.py
ombhojane's picture
Upload 88 files
8d404bc verified
import streamlit as st
import json
def app():
st.header("Skills and Experience Exercise")
core_skills_questions = [
"Job: Title or description – where and when?",
"Skills and experience: Direct or transferable",
"Accomplishments: Measurable; if possible include examples like percentage of goal, dollars in sales, revenue growth, or savings; number of employees hired or trained",
"Benefit to the Employer: how your skills and/or experience benefit the organization and its people"
]
if 'skills_experience_sets' not in st.session_state:
st.session_state.skills_experience_sets = [{}]
# Function to add another set of questions
def add_another_set():
st.session_state.skills_experience_sets.append({})
# Display current sets of questions and responses
for i, skills_set in enumerate(st.session_state.skills_experience_sets):
with st.expander(f"Skills and Experience Set {i + 1}", expanded=True):
for question in core_skills_questions:
key = f"{question}_{i}"
st.session_state.skills_experience_sets[i][question] = st.text_area(
label=question,
key=key,
value=skills_set.get(question, "")
)
st.button("Add More", on_click=add_another_set)
if st.button('Save Skills and Experience'):
save_skills_and_experience()
st.success('Skills and Experience saved successfully!')
def save_skills_and_experience():
"""Save the skills and experience sets to a JSON file."""
with open('skills_and_experience_sets.json', 'w') as file:
json.dump(st.session_state['skills_experience_sets'], file, indent=4)
if __name__ == "__main__":
app()