interviewsss / dreamjob.py
ombhojane's picture
Upload 91 files
2d63df8 verified
import streamlit as st
import json
def app():
st.header("Dream Job Exploration")
# Dream job description
dream_job_description = st.text_area("If there were no restrictions (for example, education, location, experience, or financial obligations), my dream job would be:", key="dream_job_description")
# Dream job realism
dream_job_realism = st.radio("Is obtaining this dream job a realistic possibility for me?", ("Yes", "No"), key="dream_job_realism")
# Explanation based on realism
if dream_job_realism == "Yes":
dream_job_explanation = st.text_area("If yes, explain how.", key="dream_job_explanation")
else:
dream_job_explanation = "" # Clear or ignore the explanation if not realistic
# Attributes of the dream job
dream_job_attributes = st.text_area("List at least ten specific attributes of this dream job (for example, content, culture, mission, responsibilities, or perks), as you imagine it, that appeal to you:", key="dream_job_attributes")
# Sentences about the dream job
feel_sentence = st.text_input("Working in this dream job would make me feel", key="feel_sentence")
need_sentence = st.text_input("Working this dream job would fill my need(s) for", key="need_sentence")
goal_sentence = st.text_input("Working in this dream job would meet my goal(s) of", key="goal_sentence")
if st.button('Save Dream Job Information'):
save_dream_job_info({
"dream_job_description": dream_job_description,
"dream_job_realism": dream_job_realism,
"dream_job_explanation": dream_job_explanation,
"dream_job_attributes": dream_job_attributes,
"feel_sentence": feel_sentence,
"need_sentence": need_sentence,
"goal_sentence": goal_sentence
})
st.success('Dream Job Information saved successfully!')
def save_dream_job_info(info):
"""Save the dream job information to a JSON file."""
with open('dream_job_info.json', 'w') as file:
json.dump(info, file, indent=4)
if __name__ == "__main__":
app()